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

called again.
pull/1/head
nicm 2015-04-27 22:50:35 +00:00
parent 91f6347485
commit b7777e7ef3
1 changed files with 2 additions and 0 deletions

2
cfg.c
View File

@ -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;
}