summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/refs.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/refs.c b/src/refs.c
index 290b89b41..982cd05b7 100644
--- a/src/refs.c
+++ b/src/refs.c
@@ -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);