From 40ab88899cff8c4bcf667380b027ca6aefd4ce6d Mon Sep 17 00:00:00 2001 From: Dragan Dosen Date: Thu, 17 Oct 2024 22:57:06 +0200 Subject: [PATCH] BUG/MINOR: sample: free err2 in smp_resolve_args for type ARGT_REG The err2 may be leaking memory in case an error occurred as a result of regex_comp() call. --- src/sample.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sample.c b/src/sample.c index 1951d7b6b8..67531392ac 100644 --- a/src/sample.c +++ b/src/sample.c @@ -1638,6 +1638,7 @@ int smp_resolve_args(struct proxy *p, char **err) *err ? *err : "", cur->file, cur->line, arg->data.str.area, cur->arg_pos + 1, conv_pre, conv_ctx, conv_pos, ctx, cur->kw, where, p->id, err2); + ha_free(&err2); cfgerr++; continue; } -- 2.47.3