summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorPhillip Wood <phillip.wood@dunelm.org.uk>2018-10-04 10:07:44 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-10-05 05:48:17 (GMT)
commit9c1a6c2bf8375a6652fd98439438e92626a00167 (patch)
tree7b631be3590c738f2789ee1d047e84fac78be246 /diff.c
parentfe4516d103e69e74513be33f78768ac43acf3daa (diff)
downloadgit-9c1a6c2bf8375a6652fd98439438e92626a00167.zip
git-9c1a6c2bf8375a6652fd98439438e92626a00167.tar.gz
git-9c1a6c2bf8375a6652fd98439438e92626a00167.tar.bz2
diff --color-moved-ws: fix another memory leak
This is obvious in retrospect, it was found with asan. Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Reviewed-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/diff.c b/diff.c
index 38f2609..e0ebddf 100644
--- a/diff.c
+++ b/diff.c
@@ -994,6 +994,8 @@ static void pmb_advance_or_null_multi_match(struct diff_options *o,
moved_block_clear(&pmb[i]);
}
}
+
+ free(got_match);
}
static int shrink_potential_moved_blocks(struct moved_block *pmb,