summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/load-fragment.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c
index eea415883b..242b684ddf 100644
--- a/src/core/load-fragment.c
+++ b/src/core/load-fragment.c
@@ -589,7 +589,8 @@ int config_parse_exec(const char *unit,
}
found:
- n = new(char*, k + !separate_argv0);
+ /* If seperate_argv0, we'll move first element to path variable */
+ n = new(char*, MAX(k + !separate_argv0, 1u));
if (!n)
return log_oom();