summaryrefslogtreecommitdiff
path: root/src/object.c
diff options
context:
space:
mode:
authorBen Straub <bstraub@github.com>2012-07-17 08:08:34 -0700
committerBen Straub <bstraub@github.com>2012-07-17 08:08:34 -0700
commitbfc65634050dc52e3ed6b4497ebbb511e39d6e1e (patch)
tree32b03847b8a152b69bc3b48b6bb32e7b8621f45e /src/object.c
parent1d68fcd04b21a2c5665d0ca6a5543e7166c73457 (diff)
parentea5d2ce4cfa6cec89e2d844a70d1eb24bb401c7d (diff)
downloadlibgit2-bfc65634050dc52e3ed6b4497ebbb511e39d6e1e.tar.gz
Merge branch 'development' into clone
Diffstat (limited to 'src/object.c')
-rw-r--r--src/object.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/object.c b/src/object.c
index d3673eda0..14d64befe 100644
--- a/src/object.c
+++ b/src/object.c
@@ -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);