summaryrefslogtreecommitdiff
path: root/src/shared/conf-parser.c
diff options
context:
space:
mode:
authorMartin Pitt <martin.pitt@ubuntu.com>2016-07-22 09:10:04 +0200
committerGitHub <noreply@github.com>2016-07-22 09:10:04 +0200
commit5c3c778014f4c59dd97f31ca5ab2e7374f08bbf6 (patch)
treee6df4d9329c86dbc7c0905e9f138696457f7fe47 /src/shared/conf-parser.c
parent31d28eabc10967daf06ae6ac4959a59556f1e7ff (diff)
parentc0f81393d137a258a5c255755c08b498860a5241 (diff)
Merge pull request #3764 from poettering/assorted-stuff-2
Assorted fixes
Diffstat (limited to 'src/shared/conf-parser.c')
-rw-r--r--src/shared/conf-parser.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/shared/conf-parser.c b/src/shared/conf-parser.c
index 83be79a4f5..d85ab5441e 100644
--- a/src/shared/conf-parser.c
+++ b/src/shared/conf-parser.c
@@ -708,6 +708,7 @@ int config_parse_strv(const char *unit,
void *userdata) {
char ***sv = data;
+ int r;
assert(filename);
assert(lvalue);
@@ -721,18 +722,19 @@ int config_parse_strv(const char *unit,
* we actually fill in a real empty array here rather
* than NULL, since some code wants to know if
* something was set at all... */
- empty = strv_new(NULL, NULL);
+ empty = new0(char*, 1);
if (!empty)
return log_oom();
strv_free(*sv);
*sv = empty;
+
return 0;
}
for (;;) {
char *word = NULL;
- int r;
+
r = extract_first_word(&rvalue, &word, WHITESPACE, EXTRACT_QUOTES|EXTRACT_RETAIN_ESCAPE);
if (r == 0)
break;