summaryrefslogtreecommitdiff
path: root/src/core/unit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/unit.c')
-rw-r--r--src/core/unit.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/core/unit.c b/src/core/unit.c
index 17c135cf3f..b44a2a5e2d 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -417,12 +417,11 @@ static void unit_remove_transient(Unit *u) {
STRV_FOREACH(i, u->dropin_paths) {
_cleanup_free_ char *p = NULL;
- int r;
(void) unlink(*i);
- r = path_get_parent(*i, &p);
- if (r >= 0)
+ p = dirname_malloc(*i);
+ if (p)
(void) rmdir(p);
}
}