Skip to content

Commit

Permalink
object: add missing git_odb_object_free
Browse files Browse the repository at this point in the history
  • Loading branch information
schu committed Jun 21, 2012
1 parent dca6b22 commit f95121c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/object.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,10 @@ int git_object_lookup_prefix(

type = odb_obj->raw.type;

if (create_object(&object, type) < 0)
if (create_object(&object, type) < 0) {
git_odb_object_free(odb_obj);
return -1;
}

/* Initialize parent object */
git_oid_cpy(&object->cached.oid, &odb_obj->cached.oid);
Expand Down

0 comments on commit f95121c

Please sign in to comment.