chiark / gitweb /
conf-parser: fix strv parsing
authorLennart Poettering <lennart@poettering.net>
Tue, 6 Apr 2010 19:52:35 +0000 (21:52 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 6 Apr 2010 19:52:35 +0000 (21:52 +0200)
conf-parser.c

index 8883d9e..5da5587 100644 (file)
@@ -371,6 +371,8 @@ int config_parse_strv(
         if (*sv)
                 for (k = 0; (*sv)[k]; k++)
                         n[k] = (*sv)[k];
+        else
+                k = 0;
 
         FOREACH_WORD_QUOTED(w, l, rvalue, state)
                 if (!(n[k++] = strndup(w, l)))