Validate GATT handle in CAPI 33/248433/1
authorAyush Garg <ayush.garg@samsung.com>
Thu, 26 Nov 2020 11:28:37 +0000 (16:58 +0530)
committerAyush Garg <ayush.garg@samsung.com>
Thu, 26 Nov 2020 11:28:37 +0000 (16:58 +0530)
commitc0dc21c31559f55861d6fccbd5aae67115f8d2c2
treee390ceb70200edec4a95e48f6acbf9bbffa74ec2
parent124b8bc8952eeec6c56038e137b46c53e8d8dbdc
Validate GATT handle in CAPI

Validation of GATT handle is missing in few CAPIs (ex. bt_gatt_characteristic_destroy)
which leads to coredump sometimes.
One such scenario is when application accidently calls bt_gatt_characteristic_destroy
even after destroying the GATT server.
This change will handle such cases.

Change-Id: Iafb43af73ee25b192bfa673bbde7f96498c1557e
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
src/bluetooth-gatt.c