mirror of
https://github.com/git/git.git
synced 2024-10-28 04:49:43 +01: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:
parent
44ec7c575f
commit
4b4f5a911c
1 changed files with 2 additions and 0 deletions
|
@ -234,6 +234,8 @@ static const char *parse_range_funcname(
|
||||||
}
|
}
|
||||||
|
|
||||||
regfree(®exp);
|
regfree(®exp);
|
||||||
|
if (xecfg)
|
||||||
|
xdiff_clear_find_func(xecfg);
|
||||||
free(xecfg);
|
free(xecfg);
|
||||||
free(pattern);
|
free(pattern);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue