Commit 13421eee by Vicent Marti

refs: Check alloc is cleaner

parent 3be933b1
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment