diff options
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/conf-parser.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/shared/conf-parser.c b/src/shared/conf-parser.c index b09e90ae8b..c2cf5a6a19 100644 --- a/src/shared/conf-parser.c +++ b/src/shared/conf-parser.c @@ -705,9 +705,18 @@ int config_parse_strv( assert(data); if (isempty(rvalue)) { - /* Empty assignment resets the list */ + char **empty; + + /* Empty assignment resets the list. As a special rule + * 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); + if (!empty) + return log_oom(); + strv_free(*sv); - *sv = NULL; + *sv = empty; return 0; } |