diff options
Diffstat (limited to 'merge-blobs.c')
-rw-r--r-- | merge-blobs.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/merge-blobs.c b/merge-blobs.c index 57211bccb7..7abb894c68 100644 --- 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; |