diff options
Diffstat (limited to 'src/core/load-fragment.c')
-rw-r--r-- | src/core/load-fragment.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c index 4a835b6e8b..15fabe860e 100644 --- a/src/core/load-fragment.c +++ b/src/core/load-fragment.c @@ -1564,7 +1564,7 @@ int config_parse_environ(const char *unit, assert(filename); assert(lvalue); assert(rvalue); - assert(u); + assert(data); if (isempty(rvalue)) { /* Empty assignment resets the list */ @@ -1573,7 +1573,11 @@ int config_parse_environ(const char *unit, return 0; } - k = unit_full_printf(u, rvalue); + if (u) + k = unit_full_printf(u, rvalue); + else + k = strdup(rvalue); + if (!k) return log_oom(); |