client/gatt: Fix memory leak issues
authorGopal Tiwari <gtiwari@redhat.com>
Tue, 31 May 2022 07:41:05 +0000 (13:11 +0530)
committerAyush Garg <ayush.garg@samsung.com>
Mon, 15 May 2023 09:25:54 +0000 (14:55 +0530)
commit89cb0ffcc965b4fc260df53339849f80ce44ff66
tree148c58f50c114d4aee8a7b8e189605aa8176e253
parent85922c53d4f5e7b5635537696f8a2299c0b76d55
client/gatt: Fix memory leak issues

While performing the static tool analysis using coverity tool
found following reports

Error: RESOURCE_LEAK (CWE-772):
bluez-5.64/client/gatt.c:1531: leaked_storage: Variable "service"
going out of scope leaks the storage it points to.

Error: RESOURCE_LEAK (CWE-772):
bluez-5.64/client/gatt.c:2626: leaked_storage: Variable "chrc"
going out of scope leaks the storage it points to.

Error: RESOURCE_LEAK (CWE-772):
bluez-5.64/client/gatt.c:2906: leaked_storage: Variable "desc"
going out of scope leaks the storage it points to.

Signed-off-by: Manika Shrivastava <manika.sh@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
client/gatt.c