diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-09-09 23:12:07 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-09-09 23:12:07 +0200 |
commit | 525d3cc746a037e8cc6b2e0ebaaf76a51856fa6b (patch) | |
tree | c96ffcfb5a7bf46fdbbd4ea6bf801bc3b3cf7acd /src/core/unit.c | |
parent | 6796073e330f49923c5134652ee085e29fc88002 (diff) |
tree-wide: take benefit of the fact that hashmap_free() returns NULL
And set_free() too.
Another Coccinelle patch.
Diffstat (limited to 'src/core/unit.c')
-rw-r--r-- | src/core/unit.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/core/unit.c b/src/core/unit.c index 563d7bf254..e40ea24be8 100644 --- a/src/core/unit.c +++ b/src/core/unit.c @@ -673,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) { |