mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-11-29 14:50:59 +01:00
BUG/MEDIUM: map: Fix memory leak in the map converter
The allocated trash chunk is not freed properly and causes a memory leak exhibited as the growth in the trash pool allocations. Bug was introduced in commit 271022 (BUG/MINOR: map: fix map_regm with backref). This should be backported to all branches where the above commit was backported.
This commit is contained in:
parent
c8da044b41
commit
646b7741bc
@ -207,6 +207,8 @@ static int sample_conv_map(const struct arg *arg_p, struct sample *smp, void *pr
|
|||||||
tmptrash->area,
|
tmptrash->area,
|
||||||
pat->data->u.str.area,
|
pat->data->u.str.area,
|
||||||
(regmatch_t *)smp->ctx.a[0]);
|
(regmatch_t *)smp->ctx.a[0]);
|
||||||
|
free_trash_chunk(tmptrash);
|
||||||
|
|
||||||
if (len == -1)
|
if (len == -1)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user