diff options
Diffstat (limited to 'src/refs.c')
-rw-r--r-- | src/refs.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/refs.c b/src/refs.c index 33e931db5..af3190ef9 100644 --- a/src/refs.c +++ b/src/refs.c @@ -41,10 +41,8 @@ static git_reference *alloc_ref(const char *name) if (GIT_ALLOC_OVERFLOW_ADD(reflen, namelen) || GIT_ALLOC_OVERFLOW_ADD(reflen + namelen, 1) || - (ref = git__calloc(1, reflen + namelen + 1)) == NULL) { - giterr_set_oom(); + (ref = git__calloc(1, reflen + namelen + 1)) == NULL) return NULL; - } memcpy(ref->name, name, namelen + 1); |