void pa__done(pa_module *m) {
struct userdata *u;
- struct connection *c;
pa_assert(m);
if (u->core_iface)
pa_dbusiface_core_free(u->core_iface);
- if (u->connections) {
- while ((c = pa_idxset_steal_first(u->connections, NULL)))
- connection_free(c);
-
- pa_idxset_free(u->connections, NULL, NULL);
- }
+ if (u->connections)
+ pa_idxset_free(u->connections, (pa_free_cb_t) connection_free);
/* This must not be called before the connections are freed, because if
* there are any connections left, they will emit the