- if (u->paths_to_clients)
- pa_hashmap_free(u->paths_to_clients, (pa_free_cb_t) client_data_free);
+ if (u->paths_to_clients) {
+
+ PA_HASHMAP_FOREACH(cd, u->paths_to_clients, state) {
+ pa_xfree(cd->directory);
+ while(cd->ids) {
+ struct client_id *id = cd->ids;
+ PA_LLIST_REMOVE(struct client_id, cd->ids, id);
+ pa_xfree(id);
+ }
+ }
+
+ pa_hashmap_free(u->paths_to_clients);
+ }