diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-03-27 13:02:32 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-03-27 13:02:32 -0700 |
commit | 553c622b685f0a7a83c77617377f08019d76c682 (patch) | |
tree | 59a6165ca81d3355fe9279a929563fd1c0b91d55 /merge-blobs.c | |
parent | Git 2.4.0-rc0 (diff) | |
parent | http: release the memory of a http pack request as well (diff) | |
download | tgif-553c622b685f0a7a83c77617377f08019d76c682.tar.xz |
Merge branch 'sb/leaks'
* sb/leaks:
http: release the memory of a http pack request as well
read-cache: fix memleak
add_to_index(): free unused cache-entry
commit.c: fix a memory leak
http-push: remove unneeded cleanup
merge-recursive: fix memleaks
merge-blobs.c: fix a memleak
builtin/apply.c: fix a memleak
update-index: fix a memleak
read-cache: free cache entry in add_to_index in case of early return
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; |