diff options
author | Bharat Panda <bharat.panda@samsung.com> | 2015-11-16 15:39:37 +0530 |
---|---|---|
committer | Bharat Panda <bharat.panda@samsung.com> | 2015-11-16 15:39:37 +0530 |
commit | 2a6ff0631d9acf2db0e8eb37a3938bcadb7e30e8 (patch) | |
tree | 7269038f404da487f50a0080b5df4529b069eb2f /profiles/audio | |
parent | 4531de53bd7528f1124bdfa0e7977e75a33b9c4a (diff) | |
download | bluez-2a6ff0631d9acf2db0e8eb37a3938bcadb7e30e8.tar.gz bluez-2a6ff0631d9acf2db0e8eb37a3938bcadb7e30e8.tar.bz2 bluez-2a6ff0631d9acf2db0e8eb37a3938bcadb7e30e8.zip |
audio/avrcp: Fix memory leak
This frees settings list after used otherwise it leaks as follow:
48 (24 direct, 24 indirect) bytes in 1 blocks are definitely lost in loss record 152 of 239
at 0x4C28C50: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
by 0x4E84679: g_malloc (in /usr/lib64/libglib-2.0.so.0.4400.1)
by 0x4E9BCD2: g_slice_alloc (in /usr/lib64/libglib-2.0.so.0.4400.1)
by 0x4E7A6E5: g_list_prepend (in /usr/lib64/libglib-2.0.so.0.4400.1)
by 0x4E6E44B: g_hash_table_get_keys (in /usr/lib64/libglib-2.0.so.0.4400.1)
by 0x426D5A: list_settings (media.c:1003)
by 0x4336B4: player_list_settings (avrcp.c:1390)
by 0x4336B4: avrcp_handle_register_notification (avrcp.c:1514)
by 0x436711: handle_vendordep_pdu (avrcp.c:1827)
by 0x42EB6F: session_cb (avctp.c:1025)
by 0x4E7EA89: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.4400.1)
by 0x4E7EE1F: ??? (in /usr/lib64/libglib-2.0.so.0.4400.1)
by 0x4E7F141: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.4400.1)
git repo link:
http://git.kernel.org/cgit/bluetooth/bluez.git/commit/?id=cdcea1773a484767c766dccb63c32e0086d5bd4f
Change-Id: I87ee38c217b02981f9950a1f5c43ab73a54059cd
Diffstat (limited to 'profiles/audio')
-rw-r--r-- | profiles/audio/avrcp.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/profiles/audio/avrcp.c b/profiles/audio/avrcp.c index b16efe85..9dbddc27 100644 --- a/profiles/audio/avrcp.c +++ b/profiles/audio/avrcp.c @@ -1674,6 +1674,8 @@ static uint8_t avrcp_handle_register_notification(struct avrcp *session, pdu->params[len++] = val; } + g_list_free(settings); + break; case AVRCP_EVENT_VOLUME_CHANGED: pdu->params[1] = media_transport_get_device_volume(dev); |