diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2021-06-23 15:42:39 -0700 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2021-06-23 15:45:08 -0700 |
commit | ee0f3c03fb1d4aa80abd38735980d3410a2f5cf0 (patch) | |
tree | 1e9cd47ef1a9c67cfac9469a2c0969e6dea13bf0 /profiles | |
parent | c939747f543a76ffd556312f753cf9d36c047c94 (diff) | |
download | bluez-ee0f3c03fb1d4aa80abd38735980d3410a2f5cf0.tar.gz |
media: Fix UnregisterApplication
UnregisterApplication is not doing anything since the apps queue is
never initialized which results in not finding any application when
unregistering.
Fixes: https://github.com/bluez/bluez/issues/126
Diffstat (limited to 'profiles')
-rw-r--r-- | profiles/audio/media.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/profiles/audio/media.c b/profiles/audio/media.c index c84bbe22d..267722542 100644 --- a/profiles/audio/media.c +++ b/profiles/audio/media.c @@ -2384,6 +2384,8 @@ static void path_free(void *data) { struct media_adapter *adapter = data; + queue_destroy(adapter->apps, app_free); + while (adapter->endpoints) release_endpoint(adapter->endpoints->data); @@ -2402,6 +2404,7 @@ int media_register(struct btd_adapter *btd_adapter) adapter = g_new0(struct media_adapter, 1); adapter->btd_adapter = btd_adapter_ref(btd_adapter); + adapter->apps = queue_new(); if (!g_dbus_register_interface(btd_get_dbus_connection(), adapter_get_path(btd_adapter), |