From e12981c028506176973559c73b6528f388d36938 Mon Sep 17 00:00:00 2001 From: Keith Buck Date: Sun, 2 Mar 2014 23:31:13 +0000 Subject: [PATCH] conf parsing: Fix freeing section names upon section end. --- src/newconf.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/newconf.c b/src/newconf.c index 03206f58..69c342ed 100644 --- a/src/newconf.c +++ b/src/newconf.c @@ -35,7 +35,7 @@ static int yy_defer_accept = 1; struct TopConf *conf_cur_block; -static char *conf_cur_block_name; +static char *conf_cur_block_name = NULL; static rb_dlink_list conf_items; @@ -2010,11 +2010,13 @@ conf_start_block(char *block, char *name) int conf_end_block(struct TopConf *tc) { + int ret = 0; if(tc->tc_efunc) - return tc->tc_efunc(tc); + ret = tc->tc_efunc(tc); rb_free(conf_cur_block_name); - return 0; + conf_cur_block_name = NULL; + return ret; } static void