From f95121cb4f9da6c5b06c9d0b31c2c9a969c1c09d Mon Sep 17 00:00:00 2001 From: Michael Schubert Date: Wed, 20 Jun 2012 18:07:27 +0200 Subject: [PATCH] object: add missing git_odb_object_free --- src/object.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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);