Skip to content

Commit 9c1a6c2

Browse files
phillipwoodgitster
authored andcommitted
diff --color-moved-ws: fix another memory leak
This is obvious in retrospect, it was found with asan. Signed-off-by: Phillip Wood <[email protected]> Reviewed-by: Stefan Beller <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent fe4516d commit 9c1a6c2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

diff.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -994,6 +994,8 @@ static void pmb_advance_or_null_multi_match(struct diff_options *o,
994994
moved_block_clear(&pmb[i]);
995995
}
996996
}
997+
998+
free(got_match);
997999
}
9981000

9991001
static int shrink_potential_moved_blocks(struct moved_block *pmb,

0 commit comments

Comments
 (0)