summaryrefslogtreecommitdiff
path: root/src/core/busname.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/busname.c')
-rw-r--r--src/core/busname.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/busname.c b/src/core/busname.c
index 20d49fe3e9..8e92fb47fe 100644
--- a/src/core/busname.c
+++ b/src/core/busname.c
@@ -163,9 +163,9 @@ static int busname_add_extras(BusName *n) {
assert(n);
if (!n->name) {
- n->name = unit_name_to_prefix(u->id);
- if (!n->name)
- return -ENOMEM;
+ r = unit_name_to_prefix(u->id, &n->name);
+ if (r < 0)
+ return r;
}
if (!u->description) {