Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'jk/clone-dissociate' into maint
[gitweb.git]
/
merge-blobs.c
diff --git
a/merge-blobs.c
b/merge-blobs.c
index 57211bccb7d0a5aad8538906bcb2f4ad2900f008..7abb894c684d1ff7bc26b30ffa41597451750f20 100644
(file)
--- a/
merge-blobs.c
+++ b/
merge-blobs.c
@@
-14,8
+14,10
@@
static int fill_mmfile_blob(mmfile_t *f, struct blob *obj)
buf = read_sha1_file(obj->object.sha1, &type, &size);
if (!buf)
return -1;
- if (type != OBJ_BLOB)
+ if (type != OBJ_BLOB) {
+ free(buf);
return -1;
+ }
f->ptr = buf;
f->size = size;
return 0;