Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'nd/sha1-file-delta-stack-leakage-fix'
author
Junio C Hamano
<gitster@pobox.com>
Tue, 18 Mar 2014 20:49:22 +0000
(13:49 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Tue, 18 Mar 2014 20:49:23 +0000
(13:49 -0700)
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
sha1_file.c
patch
|
blob
|
history
raw
(from parent 1:
9b34767
)
diff --git
a/sha1_file.c
b/sha1_file.c
index b37c6f67e4d97b95b4fb070aa03992eb92506421..18b2378d8a63e1dbb621854c311652fe0abef76f 100644
(file)
--- 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;
}