object: add missing git_odb_object_free

This commit is contained in:
Michael Schubert 2012-06-20 18:07:27 +02:00
parent dca6b228d1
commit f95121cb4f

View File

@ -156,8 +156,10 @@ int git_object_lookup_prefix(
type = odb_obj->raw.type; 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; return -1;
}
/* Initialize parent object */ /* Initialize parent object */
git_oid_cpy(&object->cached.oid, &odb_obj->cached.oid); git_oid_cpy(&object->cached.oid, &odb_obj->cached.oid);