1
0
mirror of https://github.com/git/git.git synced 2024-09-08 03:50:44 +02:00

line-range: plug leaking find functions

In `parse_range_funcname()` we may end up allocating a "find function",
but never free it. Fix this.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Patrick Steinhardt 2024-06-11 11:21:15 +02:00 committed by Junio C Hamano
parent 44ec7c575f
commit 4b4f5a911c

View File

@ -234,6 +234,8 @@ static const char *parse_range_funcname(
}
regfree(&regexp);
if (xecfg)
xdiff_clear_find_func(xecfg);
free(xecfg);
free(pattern);