Skip to content

Commit

Permalink
media: Fix UnregisterApplication
Browse files Browse the repository at this point in the history
UnregisterApplication is not doing anything since the apps queue is
never initialized which results in not finding any application when
unregistering.

Fixes: bluez#126
  • Loading branch information
Vudentz authored and tedd-an committed Jun 23, 2021
1 parent 4cc3c21 commit 66ddac6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions profiles/audio/media.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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),
Expand Down

0 comments on commit 66ddac6

Please sign in to comment.