mirror of
https://git.proxmox.com/git/libgit2
synced 2025-08-12 08:34:36 +00:00
Added GITERR_CHECK_ALLOC
This commit is contained in:
parent
e057e41122
commit
ccaee222a1
@ -148,15 +148,11 @@ int git_cred_ssh_publickey_new(
|
||||
c->parent.free = ssh_publickey_free;
|
||||
|
||||
c->publickey = git__malloc(publickey_len);
|
||||
GITERR_CHECK_ALLOC(c->publickey);
|
||||
|
||||
memcpy(c->publickey, publickey, publickey_len);
|
||||
|
||||
if (!c->publickey) {
|
||||
git__free(c);
|
||||
return -1;
|
||||
}
|
||||
|
||||
c->publickey_len = publickey_len;
|
||||
|
||||
c->sign_callback = sign_callback;
|
||||
c->sign_data = sign_data;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user