aboutsummaryrefslogtreecommitdiff
path: root/src/config.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.c')
-rw-r--r--src/config.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/config.c b/src/config.c
index 88f4c84..b268057 100644
--- a/src/config.c
+++ b/src/config.c
@@ -37,11 +37,16 @@ config_parse(char *content)
list_add(array_values, l);
list_add(values, wrap_ptr(NULL));
+
+ free(l);
} else {
+ list_t *l = list_create(sizeof(ptr_wrapper_t));
char *value = trim(strsep(&buffer, "\n"));
- list_add(array_values, wrap_ptr(NULL));
+ list_add(array_values, l);
list_add(values, wrap_ptr(strdup(value)));
+
+ free(l);
}
key = trim(strsep(&buffer, DELIM));