mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-06 23:26:39 +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);
|
ref = git_reference__alloc_symbolic(refdb, name, symbolic);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ref == NULL)
|
GITERR_CHECK_ALLOC(ref);
|
||||||
return -1;
|
|
||||||
|
|
||||||
if ((error = git_refdb_write(refdb, ref)) < 0) {
|
if ((error = git_refdb_write(refdb, ref)) < 0) {
|
||||||
git_reference_free(ref);
|
git_reference_free(ref);
|
||||||
|
Loading…
Reference in New Issue
Block a user