summaryrefslogtreecommitdiff
path: root/src/object.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/object.c')
-rw-r--r--src/object.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/object.c b/src/object.c
index 979fb40ca..8e8eac4e3 100644
--- a/src/object.c
+++ b/src/object.c
@@ -62,8 +62,7 @@ static int create_object(git_object **object_out, git_otype type)
case GIT_OBJ_BLOB:
case GIT_OBJ_TREE:
object = git__malloc(git_object__size(type));
- if (object == NULL)
- return GIT_ENOMEM;
+ GITERR_CHECK_ALLOC(object);
memset(object, 0x0, git_object__size(type));
break;