mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-03 09:01:50 -05:00
bluez5: Fix free order of adapters and devices
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>
This commit is contained in:
parent
580f468900
commit
9793870b23
1 changed files with 3 additions and 3 deletions
|
|
@ -1660,12 +1660,12 @@ void pa_bluetooth_discovery_unref(pa_bluetooth_discovery *y) {
|
||||||
|
|
||||||
pa_dbus_free_pending_list(&y->pending);
|
pa_dbus_free_pending_list(&y->pending);
|
||||||
|
|
||||||
if (y->devices)
|
|
||||||
pa_hashmap_free(y->devices);
|
|
||||||
|
|
||||||
if (y->adapters)
|
if (y->adapters)
|
||||||
pa_hashmap_free(y->adapters);
|
pa_hashmap_free(y->adapters);
|
||||||
|
|
||||||
|
if (y->devices)
|
||||||
|
pa_hashmap_free(y->devices);
|
||||||
|
|
||||||
if (y->transports) {
|
if (y->transports) {
|
||||||
pa_assert(pa_hashmap_isempty(y->transports));
|
pa_assert(pa_hashmap_isempty(y->transports));
|
||||||
pa_hashmap_free(y->transports);
|
pa_hashmap_free(y->transports);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue