OSDN Git Service
audio/AVRCP: Fix memory leaks
When the remote stack support both AVAILABLE_PLAYER_CHANGED and
ADDRESSED_PLAYER_CHANGED the player twice are inited twice leaking
the memory allocated in the first time:
16 bytes in 1 blocks are definitely lost in loss record 45 of 236
at 0x4A06409: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
by 0x32F544D89E: g_malloc (in /usr/lib64/libglib-2.0.so.0.3600.3)
by 0x32F5464BF7: g_memdup (in /usr/lib64/libglib-2.0.so.0.3600.3)
by 0x4247CC: avrcp_get_media_player_list_rsp (avrcp.c:2432)
by 0x41ECAB: session_browsing_cb (avctp.c:826)
by 0x32F5447E05: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3600.3)
by 0x32F5448157: ??? (in /usr/lib64/libglib-2.0.so.0.3600.3)
by 0x32F5448559: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3600.3)
by 0x40A28F: main (main.c:583)
16 bytes in 1 blocks are definitely lost in loss record 46 of 236
at 0x4A082F7: realloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
by 0x32F544D946: g_realloc (in /usr/lib64/libglib-2.0.so.0.3600.3)
by 0x32F5466D43: ??? (in /usr/lib64/libglib-2.0.so.0.3600.3)
by 0x32F5467032: g_string_insert_len (in /usr/lib64/libglib-2.0.so.0.3600.3)
by 0x32F5435287: ??? (in /usr/lib64/libglib-2.0.so.0.3600.3)
by 0x421E62: avrcp_set_browsed_player_rsp (avrcp.c:2349)
by 0x41ECAB: session_browsing_cb (avctp.c:826)
by 0x32F5447E05: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3600.3)
by 0x32F5448157: ??? (in /usr/lib64/libglib-2.0.so.0.3600.3)
by 0x32F5448559: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3600.3)
by 0x40A28F: main (main.c:583)