diff options
author | Michael Schubert <schu@schu.io> | 2012-06-20 18:07:27 +0200 |
---|---|---|
committer | Michael Schubert <schu@schu.io> | 2012-06-21 10:33:24 +0200 |
commit | f95121cb4f9da6c5b06c9d0b31c2c9a969c1c09d (patch) | |
tree | ef7bf496453d4f5062dcfb3869ef4d35e81a02aa /src/object.c | |
parent | dca6b228d1725ce9ce7b940a172770f0e58b76cd (diff) | |
download | libgit2-f95121cb4f9da6c5b06c9d0b31c2c9a969c1c09d.tar.gz |
object: add missing git_odb_object_free
Diffstat (limited to 'src/object.c')
-rw-r--r-- | src/object.c | 4 |
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); |