mesh-gatt: Fix use_after_free
authorGopal Tiwari <gtiwari@redhat.com>
Tue, 31 May 2022 07:41:17 +0000 (13:11 +0530)
committerAyush Garg <ayush.garg@samsung.com>
Mon, 15 May 2023 09:25:54 +0000 (14:55 +0530)
commit48a2e9f47e6c07dd413c3f1411303dbbe109a01f
tree00a6704c6527d8abbe622d47dcbac572d0007bb4
parent537f202af0fe1281aec751891f6c259b1766a2dc
mesh-gatt: Fix use_after_free

Following scenario happens when prov is false and we have double free as
mentioned in the below

bluez-5.64/tools/mesh-gatt/prov-db.c:847: freed_arg: "g_free" frees
"in_str".

bluez-5.64/tools/mesh-gatt/prov-db.c:867: double_free: Calling "g_free"
frees pointer "in_str" which has already been freed.

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