summaryrefslogtreecommitdiff
path: root/src/shared/unit-name.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/unit-name.c')
-rw-r--r--src/shared/unit-name.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/unit-name.c b/src/shared/unit-name.c
index e9b0636143..6c167b4331 100644
--- a/src/shared/unit-name.c
+++ b/src/shared/unit-name.c
@@ -493,7 +493,7 @@ char *unit_name_mangle(const char *name, enum unit_name_mangle allow_globs) {
/* We'll only escape the obvious characters here, to play
* safe. */
- r = new(char, strlen(name) * 4 + 1 + sizeof(".service")-1);
+ r = new(char, strlen(name) * 4 + strlen(".service") + 1);
if (!r)
return NULL;