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.
This commit is contained in:
Dragan Dosen 2024-10-17 22:57:06 +02:00 committed by Willy Tarreau
parent 9262b7109e
commit 40ab88899c

View File

@ -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;
}