summaryrefslogtreecommitdiff
path: root/src/lib-config
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib-config')
-rw-r--r--src/lib-config/get.c5
1 files changed, 4 insertions, 1 deletions
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);