summaryrefslogtreecommitdiff
path: root/sha1_file.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-03-18 13:49:22 -0700
committerJunio C Hamano <gitster@pobox.com>2014-03-18 13:49:23 -0700
commitdecba94d2c664229d16ee7c3cc442c0ada6090b9 (patch)
tree96b6f8e90cc76ecc93d928f91ba53dbf7b3d6687 /sha1_file.c
parent9b347673a1efbef525ff8b39f33f0b59e829be3c (diff)
parent019d1e65f5bc715a40b1cd77852af0a649753c56 (diff)
downloadgit-decba94d2c664229d16ee7c3cc442c0ada6090b9.tar.gz
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
Diffstat (limited to 'sha1_file.c')
-rw-r--r--sha1_file.c4
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;
}