diff options
Diffstat (limited to 'conf-parser.c')
-rw-r--r-- | conf-parser.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/conf-parser.c b/conf-parser.c index aebf61aaf5..8883d9ed68 100644 --- a/conf-parser.c +++ b/conf-parser.c @@ -368,8 +368,10 @@ int config_parse_strv( if (!(n = new(char*, k+1))) return -ENOMEM; - for (k = 0; (*sv)[k]; k++) - n[k] = (*sv)[k]; + if (*sv) + for (k = 0; (*sv)[k]; k++) + n[k] = (*sv)[k]; + FOREACH_WORD_QUOTED(w, l, rvalue, state) if (!(n[k++] = strndup(w, l))) goto fail; |