summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Johannes Schindelin <johannes.schindelin@gmx.de>2017-05-04 15:56:54 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-05-08 12:18:19 +0900
commit077a34e0b9401f9bcea991d850f1111a70e7d3d1 (patch)
tree7de81310ab49fdc81dcef530cef583f00a82b3e9
parentsetup_discovered_git_dir(): plug memory leak (diff)
downloadtgif-077a34e0b9401f9bcea991d850f1111a70e7d3d1.tar.xz
pack-redundant: plug memory leak
Identified via Coverity. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--builtin/pack-redundant.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/builtin/pack-redundant.c b/builtin/pack-redundant.c
index 72c815844d..cb1df1c761 100644
--- a/builtin/pack-redundant.c
+++ b/builtin/pack-redundant.c
@@ -442,6 +442,7 @@ static void minimize(struct pack_list **min)
/* return if there are no objects missing from the unique set */
if (missing->size == 0) {
*min = unique;
+ free(missing);
return;
}