From: Willy Tarreau Date: Fri, 14 Dec 2018 09:19:28 +0000 (+0100) Subject: BUG/MEDIUM: cache: fix random crash on filter parser's error path X-Git-Tag: v1.9-dev11~51 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a73da1ed25df3ade12c5ae3aafdad82bf2ec5384;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/src/cache.c b/src/cache.c index 9cfb5350ba..74743f2b51 100644 --- a/src/cache.c +++ b/src/cache.c @@ -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;