From b2e2e4831c49e58a9ae11dc33eb09feb6f1e04a8 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Thu, 13 Mar 2014 00:29:58 +0100 Subject: Free resources from config-ini.c on exit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/config-ini.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/config-ini.c') diff --git a/src/config-ini.c b/src/config-ini.c index 4541a0f..8c82d72 100644 --- a/src/config-ini.c +++ b/src/config-ini.c @@ -216,15 +216,19 @@ config_ini_free(config_ini_state_t *state) while (section != NULL) { config_ini_setting_t *setting = section->settings; + config_ini_section_t *section_prev = section; while (setting != NULL) { + config_ini_setting_t *setting_prev = setting; free(setting->name); free(setting->value); setting = setting->next; + free(setting_prev); } free(section->name); section = section->next; + free(section_prev); } } -- cgit v1.2.3-70-g09d2