diff options
author | Patrick Steinhardt <ps@pks.im> | 2024-06-11 11:21:15 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-06-11 22:15:08 +0200 |
commit | 4b4f5a911c4d2fedf4620ff079dcb2a5a0edccc7 (patch) | |
tree | 77f165f2c9339040c2524862c9cab31977224177 /line-range.c | |
parent | merge: fix leaking merge bases (diff) | |
download | git-4b4f5a911c4d2fedf4620ff079dcb2a5a0edccc7.tar.xz git-4b4f5a911c4d2fedf4620ff079dcb2a5a0edccc7.zip |
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>
Diffstat (limited to 'line-range.c')
-rw-r--r-- | line-range.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/line-range.c b/line-range.c index 60f0e5ada8..b99f0d9895 100644 --- a/line-range.c +++ b/line-range.c @@ -234,6 +234,8 @@ static const char *parse_range_funcname( } regfree(®exp); + if (xecfg) + xdiff_clear_find_func(xecfg); free(xecfg); free(pattern); |