diff options
author | Matt Ranostay <matt.ranostay@konsulko.com> | 2017-05-20 13:46:12 -0700 |
---|---|---|
committer | Matt Ranostay <matt.ranostay@konsulko.com> | 2017-05-20 13:46:54 -0700 |
commit | caea8eb4305404f0a03e089e7e625833ef66d95f (patch) | |
tree | 6e3c00b516393c9184f5bb44be625223a0278c2a /binding-bluetooth | |
parent | 2c43f450ffff7ed1beca03bf9d024a883f857d58 (diff) |
binding: bluetooth: fix memory leak in avrcp controlsdab_3.99.1dab/3.99.13.99.1
avrcp data pointers need to be freed when btd_device
structure is destroyed
Change-Id: I39b534665d9e7b74ff20443668b5fee395446aa9
Bug-AGL: SPEC-596
Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Diffstat (limited to 'binding-bluetooth')
-rw-r--r-- | binding-bluetooth/bluetooth-manager.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/binding-bluetooth/bluetooth-manager.c b/binding-bluetooth/bluetooth-manager.c index 35c770f..1f18f8b 100644 --- a/binding-bluetooth/bluetooth-manager.c +++ b/binding-bluetooth/bluetooth-manager.c @@ -157,6 +157,24 @@ void device_free(struct btd_device* device) device->name = NULL; } + if (device->avrcp_title) { + D_PRINTF("avrcp_title:%s\n",device->avrcp_title); + g_free(device->avrcp_title); + device->avrcp_title = NULL; + } + + if (device->avrcp_artist) { + D_PRINTF("avrcp_artist:%s\n",device->avrcp_artist); + g_free(device->avrcp_artist); + device->avrcp_artist = NULL; + } + + if (device->avrcp_status) { + D_PRINTF("avrcp_status:%s\n",device->avrcp_status); + g_free(device->avrcp_status); + device->avrcp_status = NULL; + } + g_free(device); } |