From 6ac199932f68320318da1e89a2f9d4413cca4b05 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Tue, 2 Oct 2012 17:01:39 +0300 Subject: [PATCH] AVRCP: Fix not freeing session list on exit 96 (16 direct, 80 indirect) bytes in 1 blocks are definitely lost in loss record 261 of 338 at 0x4A0884D: malloc (vg_replace_malloc.c:263) by 0x4C803FE: g_malloc (in /usr/lib64/libglib-2.0.so.0.3200.4) by 0x4C94801: g_slice_alloc (in /usr/lib64/libglib-2.0.so.0.3200.4) by 0x4C95B42: g_slist_append (in /usr/lib64/libglib-2.0.so.0.3200.4) by 0x12FDAD: state_changed (avrcp.c:1401) by 0x12D3B1: avctp_set_state (avctp.c:406) by 0x12E5C4: avctp_confirm_cb (avctp.c:896) by 0x1607D3: server_cb (btio.c:254) by 0x4C7A824: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3200.4) by 0x4C7AB57: ??? (in /usr/lib64/libglib-2.0.so.0.3200.4) by 0x4C7AF51: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3200.4) by 0x120EB1: main (main.c:551) --- audio/avrcp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/audio/avrcp.c b/audio/avrcp.c index 2e36fb7d0..aa629871e 100644 --- a/audio/avrcp.c +++ b/audio/avrcp.c @@ -1489,6 +1489,7 @@ void avrcp_unregister(const bdaddr_t *src) if (!server) return; + g_slist_free_full(server->sessions, g_free); g_slist_free_full(server->players, player_destroy); servers = g_slist_remove(servers, server); -- 2.47.3