mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 22:31:28 +02:00
BUG/MINOR: log: fixing small memory leak in error code path.
since we do not log the sample fetch when it is invalid, we can free the log data.
This commit is contained in:
parent
6fb4ba38e0
commit
93e8b88f06
@ -484,6 +484,8 @@ int add_sample_to_logformat_list(char *text, char *arg, int arg_len, struct prox
|
|||||||
node->options |= LOG_OPT_RES_CAP; /* fetch method is response-compatible */
|
node->options |= LOG_OPT_RES_CAP; /* fetch method is response-compatible */
|
||||||
|
|
||||||
if (!(expr->fetch->val & cap)) {
|
if (!(expr->fetch->val & cap)) {
|
||||||
|
free(node);
|
||||||
|
node = NULL;
|
||||||
memprintf(err, "sample fetch <%s> may not be reliably used here because it needs '%s' which is not available here",
|
memprintf(err, "sample fetch <%s> may not be reliably used here because it needs '%s' which is not available here",
|
||||||
text, sample_src_names(expr->fetch->use));
|
text, sample_src_names(expr->fetch->use));
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user