summaryrefslogtreecommitdiff
path: root/src/core/unit.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-07-02 15:49:27 +0200
committerLennart Poettering <lennart@poettering.net>2013-07-02 15:49:27 +0200
commit8aec412ff697bc14995746953912ca6fdf2c9ba8 (patch)
treee88fe2eacac802ba521a6378871e1212f11dec2f /src/core/unit.c
parent97e67f1e52ddc0c21a88cfbcab57e83c59ee627d (diff)
machined: sync to /run after job completed
Diffstat (limited to 'src/core/unit.c')
-rw-r--r--src/core/unit.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/core/unit.c b/src/core/unit.c
index 991111ab31..acc575b6e0 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -231,8 +231,13 @@ int unit_set_description(Unit *u, const char *description) {
assert(u);
- if (!(s = strdup(description)))
- return -ENOMEM;
+ if (isempty(description))
+ s = NULL;
+ else {
+ s = strdup(description);
+ if (!s)
+ return -ENOMEM;
+ }
free(u->description);
u->description = s;