diff options
author | Junio C Hamano <gitster@pobox.com> | 2014-03-18 13:49:22 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-03-18 13:49:23 -0700 |
commit | decba94d2c664229d16ee7c3cc442c0ada6090b9 (patch) | |
tree | 96b6f8e90cc76ecc93d928f91ba53dbf7b3d6687 | |
parent | Merge branch 'jk/diff-filespec-cleanup' (diff) | |
parent | sha1_file: fix delta_stack memory leak in unpack_entry (diff) | |
download | tgif-decba94d2c664229d16ee7c3cc442c0ada6090b9.tar.xz |
Merge branch 'nd/sha1-file-delta-stack-leakage-fix'
Fix a small leak in the delta stack used when resolving a long
delta chain at runtime.
* nd/sha1-file-delta-stack-leakage-fix:
sha1_file: fix delta_stack memory leak in unpack_entry
-rw-r--r-- | sha1_file.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sha1_file.c b/sha1_file.c index b37c6f67e4..18b2378d8a 100644 --- a/sha1_file.c +++ b/sha1_file.c @@ -2288,6 +2288,10 @@ void *unpack_entry(struct packed_git *p, off_t obj_offset, *final_size = size; unuse_pack(&w_curs); + + if (delta_stack != small_delta_stack) + free(delta_stack); + return data; } |