X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Funit.c;h=229f44c1a97459e17152bca68845bf62af344382;hb=53ec43c61d2f0e19c41640c63ec034b2f8cedb89;hp=3bb41a42393880dd12c3899c72a220b09131e449;hpb=3930341a76d2f13e25d59baba4eafaf075e8ffeb;p=elogind.git diff --git a/src/unit.c b/src/unit.c index 3bb41a423..229f44c1a 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;