summaryrefslogtreecommitdiff
path: root/src/object.c
diff options
context:
space:
mode:
authorMichael Schubert <schu@schu.io>2012-06-20 18:07:27 +0200
committerMichael Schubert <schu@schu.io>2012-06-21 10:33:24 +0200
commitf95121cb4f9da6c5b06c9d0b31c2c9a969c1c09d (patch)
treeef7bf496453d4f5062dcfb3869ef4d35e81a02aa /src/object.c
parentdca6b228d1725ce9ce7b940a172770f0e58b76cd (diff)
downloadlibgit2-f95121cb4f9da6c5b06c9d0b31c2c9a969c1c09d.tar.gz
object: add missing git_odb_object_free
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);