summaryrefslogtreecommitdiff
path: root/src/unit.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-06-15 02:45:26 +0200
committerLennart Poettering <lennart@poettering.net>2010-06-15 02:45:26 +0200
commit53ec43c61d2f0e19c41640c63ec034b2f8cedb89 (patch)
treeb541638dcdc95a7083a3db37fa1b693f1d8866a2 /src/unit.c
parent3930341a76d2f13e25d59baba4eafaf075e8ffeb (diff)
set: introduce set_free_free()
Diffstat (limited to 'src/unit.c')
-rw-r--r--src/unit.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/unit.c b/src/unit.c
index 3bb41a4239..229f44c1a9 100644
--- a/src/unit.c
+++ b/src/unit.c
@@ -354,9 +354,7 @@ void unit_free(Unit *u) {
free(u->meta.description);
free(u->meta.fragment_path);
- while ((t = set_steal_first(u->meta.names)))
- free(t);
- set_free(u->meta.names);
+ set_free_free(u->meta.names);
free(u->meta.instance);
@@ -402,10 +400,7 @@ static void merge_names(Unit *u, Unit *other) {
complete_move(&u->meta.names, &other->meta.names);
- while ((t = set_steal_first(other->meta.names)))
- free(t);
-
- set_free(other->meta.names);
+ set_free_free(other->meta.names);
other->meta.names = NULL;
other->meta.id = NULL;