From: Phillip Wood Date: Thu, 4 Oct 2018 10:07:44 +0000 (+0100) Subject: diff --color-moved-ws: fix another memory leak X-Git-Tag: v2.20.0-rc0~153^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9c1a6c2bf8375a6652fd98439438e92626a00167;p=thirdparty%2Fgit.git diff --color-moved-ws: fix another memory leak This is obvious in retrospect, it was found with asan. Signed-off-by: Phillip Wood Reviewed-by: Stefan Beller Signed-off-by: Junio C Hamano --- diff --git a/diff.c b/diff.c index 38f26091f3..e0ebddfac9 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,