mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-06 19:37:29 +00:00
refs: Check alloc is cleaner
This commit is contained in:
parent
3be933b143
commit
13421eee1a
@ -373,8 +373,7 @@ static int reference__create(
|
||||
ref = git_reference__alloc_symbolic(refdb, name, symbolic);
|
||||
}
|
||||
|
||||
if (ref == NULL)
|
||||
return -1;
|
||||
GITERR_CHECK_ALLOC(ref);
|
||||
|
||||
if ((error = git_refdb_write(refdb, ref)) < 0) {
|
||||
git_reference_free(ref);
|
||||
|
Loading…
Reference in New Issue
Block a user