summaryrefslogtreecommitdiff
path: root/src/core/unit.c
diff options
context:
space:
mode:
authorDaniel Mack <github@zonque.org>2015-09-10 13:46:14 +0200
committerDaniel Mack <github@zonque.org>2015-09-10 13:46:14 +0200
commitf33be3119806f96898dda6ade492fbdcdf8f79b8 (patch)
tree3c470fb770c5a19f848df0487f01af89b0aa6bea /src/core/unit.c
parent89921f6ed085d77225204e160ce2cee99ed0c6fa (diff)
parent525d3cc746a037e8cc6b2e0ebaaf76a51856fa6b (diff)
Merge pull request #1226 from poettering/coccinelle-fixes3
Third round of Coccinelle fixes
Diffstat (limited to 'src/core/unit.c')
-rw-r--r--src/core/unit.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/core/unit.c b/src/core/unit.c
index 24a6747b10..e40ea24be8 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -445,8 +445,7 @@ static void unit_free_requires_mounts_for(Unit *u) {
}
}
- strv_free(u->requires_mounts_for);
- u->requires_mounts_for = NULL;
+ u->requires_mounts_for = strv_free(u->requires_mounts_for);
}
static void unit_done(Unit *u) {
@@ -674,8 +673,7 @@ static void merge_dependencies(Unit *u, Unit *other, const char *other_id, UnitD
/* The move cannot fail. The caller must have performed a reservation. */
assert_se(complete_move(&u->dependencies[d], &other->dependencies[d]) == 0);
- set_free(other->dependencies[d]);
- other->dependencies[d] = NULL;
+ other->dependencies[d] = set_free(other->dependencies[d]);
}
int unit_merge(Unit *u, Unit *other) {