From 8dab451d18a7b866a927eec880bdc0f92af3deaf Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Wed, 16 Aug 2000 00:48:51 +0000 Subject: [PATCH] Small memleak fixed git-svn-id: http://svn.irssi.org/repos/irssi/trunk@613 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/lib-config/get.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib-config/get.c b/src/lib-config/get.c index 0a41272b..c4cde5b8 100644 --- a/src/lib-config/get.c +++ b/src/lib-config/get.c @@ -91,7 +91,10 @@ CONFIG_NODE *config_node_traverse(CONFIG_REC *rec, const char *section, int crea if (create) new_type = is_list ? NODE_TYPE_LIST : NODE_TYPE_BLOCK; node = config_node_section(node, *tmp + is_list, new_type); - if (node == NULL) return NULL; + if (node == NULL) { + g_strfreev(list); + return NULL; + } } g_strfreev(list);