From b7777e7ef37a6a5b9a231602c1ac66a307ae23db Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 27 Apr 2015 22:50:35 +0000 Subject: [PATCH] Reset cfg_ncauses to 0 as well or we could allocate the wrong size if called again. --- cfg.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cfg.c b/cfg.c index bacec996..8b44ce24 100644 --- a/cfg.c +++ b/cfg.c @@ -140,6 +140,7 @@ cfg_print_causes(struct cmd_q *cmdq) free(cfg_causes); cfg_causes = NULL; + cfg_ncauses = 0; } void @@ -161,4 +162,5 @@ cfg_show_causes(struct session *s) free(cfg_causes); cfg_causes = NULL; + cfg_ncauses = 0; }