From: Thierry Fournier Date: Fri, 25 Mar 2016 07:43:46 +0000 (+0100) Subject: BUG/MINOR: prevent the dump of uninitialized vars X-Git-Tag: v1.7-dev3~88 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ac9d467c5eb0ecb1a1327671a61a69efd89bc298;p=thirdparty%2Fhaproxy.git BUG/MINOR: prevent the dump of uninitialized vars Some vars are not initialized when the dumps of variables are called. This patch prevent the dereferencement of uninitialized pointers. --- diff --git a/src/dumpstats.c b/src/dumpstats.c index 1bb5d8858e..9dd859f87e 100644 --- a/src/dumpstats.c +++ b/src/dumpstats.c @@ -4107,6 +4107,9 @@ static int stats_dump_li_stats(struct stream_interface *si, struct proxy *px, st struct appctx *appctx = __objt_appctx(si->end); struct chunk *out = get_trash_chunk(); + if (!l->counters) + return 0; + chunk_reset(out); memset(&stats, 0, sizeof(stats));