aboutsummaryrefslogtreecommitdiff
path: root/src/strlist.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/strlist.c')
-rw-r--r--src/strlist.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/strlist.c b/src/strlist.c
index bdacb5a..d1bb926 100644
--- a/src/strlist.c
+++ b/src/strlist.c
@@ -174,13 +174,16 @@ void strlist_append_strlist(struct StrList *pStrList1, struct StrList *pStrList2
return;
}
- token = split(str, delim, 0);
+ char *tmp = strdup(str);
+ token = split(tmp, delim, 0);
if (token) {
for (size_t i = 0; token[i] != NULL; i++) {
+ lstrip(token[i]);
strlist_append(&pStrList, token[i]);
}
GENERIC_ARRAY_FREE(token);
}
+ guard_free(tmp);
}
/**