From ac9d467c5eb0ecb1a1327671a61a69efd89bc298 Mon Sep 17 00:00:00 2001 From: Thierry Fournier Date: Fri, 25 Mar 2016 08:43:46 +0100 Subject: [PATCH] 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. --- src/dumpstats.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/dumpstats.c b/src/dumpstats.c index 1bb5d8858..9dd859f87 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));