Reset cfg_ncauses to 0 as well or we could allocate the wrong size if

called again.
This commit is contained in:
nicm 2015-04-27 22:50:35 +00:00
parent 91f6347485
commit b7777e7ef3

2
cfg.c
View File

@ -140,6 +140,7 @@ cfg_print_causes(struct cmd_q *cmdq)
free(cfg_causes); free(cfg_causes);
cfg_causes = NULL; cfg_causes = NULL;
cfg_ncauses = 0;
} }
void void
@ -161,4 +162,5 @@ cfg_show_causes(struct session *s)
free(cfg_causes); free(cfg_causes);
cfg_causes = NULL; cfg_causes = NULL;
cfg_ncauses = 0;
} }