BUG/MINOR: haproxy: fix rule->file memory leak

When using the "use_backend" configuration directive, the configuration
file name stored as rule->file was not freed in some situations. This
was introduced in commit 4ed1c95 ("MINOR: http/conf: store the
use_backend configuration file and line for logs").

This patch should be backported to 1.9, 1.8 and 1.7.
This commit is contained in:
Dragan Dosen 2019-04-30 00:38:36 +02:00 committed by Willy Tarreau
parent b51937ebaa
commit 2a7c20f602

View File

@ -2223,8 +2223,8 @@ void deinit(void)
if (rule->cond) {
prune_acl_cond(rule->cond);
free(rule->cond);
free(rule->file);
}
free(rule->file);
free(rule);
}