Because the adapters reference the devices hashmap on free, we mush
free the adapters hashmap first and then the devices hashmap.
Reported-by: Alexander Patrakov <patrakov@gmail.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
pa_dbus_free_pending_list(&y->pending);
- if (y->devices)
- pa_hashmap_free(y->devices);
-
if (y->adapters)
pa_hashmap_free(y->adapters);
+ if (y->devices)
+ pa_hashmap_free(y->devices);
+
if (y->transports) {
pa_assert(pa_hashmap_isempty(y->transports));
pa_hashmap_free(y->transports);