diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/sp_config_utils.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/sp_config_utils.c b/src/sp_config_utils.c index 84b1f30..415e434 100644 --- a/src/sp_config_utils.c +++ b/src/sp_config_utils.c | |||
| @@ -11,8 +11,9 @@ sp_list_node *parse_functions_list(const char *const value) { | |||
| 11 | sp_list_node *list = NULL; | 11 | sp_list_node *list = NULL; |
| 12 | char *tmp = strdup(value); | 12 | char *tmp = strdup(value); |
| 13 | const char *function_name; | 13 | const char *function_name; |
| 14 | char *next_token = tmp; | 14 | char *next_token = NULL; |
| 15 | while ((function_name = strtok_r(NULL, sep, &next_token))) { | 15 | for (function_name = strtok_r(tmp, sep, &next_token); function_name; |
| 16 | function_name = strtok_r(NULL, sep, &next_token)) { | ||
| 16 | list = sp_list_prepend(list, strdup(function_name)); | 17 | list = sp_list_prepend(list, strdup(function_name)); |
| 17 | } | 18 | } |
| 18 | free(tmp); | 19 | free(tmp); |
