]> granicus.if.org Git - esp-idf/commit
components/bt: Fix a probable memory leak for BTA_GATTS_CONF_EVT event
authorHrishikesh Dhayagude <hrishi@espressif.com>
Wed, 8 Aug 2018 08:46:03 +0000 (14:16 +0530)
committerbot <bot@espressif.com>
Sat, 25 Aug 2018 16:26:37 +0000 (16:26 +0000)
commit29ec0339f68ae72df4b56ef7e73bdf9707b89b10
treeb9e35e5c9c7a6498b864af9f0423d1bf4d3d0c45
parentb14e87a60575f895c2ce897ae970b2acfc58a934
components/bt: Fix a probable memory leak for BTA_GATTS_CONF_EVT event

Multiple modules register their callback BTA_GATTS_AppRegister().

If any of the callbacks do not free the allocated pointer in
BTA_GATTS_CONF_EVT event, then this can result in memory leak.

So, free the pointer after the callback function is called and remove
the calls to free in the callback functions as it is now not required

Signed-off-by: Hrishikesh Dhayagude <hrishi@espressif.com>
components/bt/bluedroid/bta/gatt/bta_gatts_act.c
components/bt/bluedroid/btc/profile/esp/blufi/blufi_prf.c
components/bt/bluedroid/btc/profile/std/gatt/btc_gatts.c