BUG/MINOR: cache: fix memory leak in parse_cache_rule error path

When the filter config (fconf) allocation fails in parse_cache_rule,
the previously allocated cache_flt_conf (cconf) and its strdup'd name
string are not freed. The error path only freed cconf but not
cconf->c.name, causing a memory leak.

No backport is needed.
This commit is contained in:
Willy Tarreau 2026-05-11 15:26:32 +02:00
parent 2dfbc311a8
commit 5830cf3ccf

View file

@ -1950,7 +1950,10 @@ static int parse_cache_rule(struct proxy *proxy, const char *name, struct act_ru
return 1;
err:
free(cconf);
if (cconf) {
free(cconf->c.name);
free(cconf);
}
return 0;
}