BUG/MEDIUM: cache: fix random crash on filter parser's error path

The cconf variable was not initialized before the two first possible
error exits before being freed, resulting in random crashes instead
of displaying an error message if the cache ID was missing from the
filter declaration.

No backport is needed, this is exclusively 1.9.
This commit is contained in:
Willy Tarreau 2018-12-14 10:19:28 +01:00
parent 4a7b5b3fdb
commit a73da1ed25

View File

@ -1639,7 +1639,7 @@ parse_cache_flt(char **args, int *cur_arg, struct proxy *px,
struct flt_conf *fconf, char **err, void *private)
{
struct flt_conf *f, *back;
struct cache_flt_conf *cconf;
struct cache_flt_conf *cconf = NULL;
char *name = NULL;
int pos = *cur_arg;