]> err.no Git - systemd/commitdiff
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 8883d9ed6871191633e7dc77580b746b028f7af3..5da55874085c2cc0604320d41eca77ca38e9135f 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)))