Fix Coverity issue 93/289893/2 accepted/tizen/unified/20230320.021840
authorAnuj Jain <anuj01.jain@samsung.com>
Wed, 15 Mar 2023 06:46:09 +0000 (12:16 +0530)
committerAnuj Jain <anuj01.jain@samsung.com>
Wed, 15 Mar 2023 06:53:22 +0000 (12:23 +0530)
This patch fixes Coverity issue:
CID : 1668452 (RESOURCE_LEAK)

Change-Id: Idf35488d83e6f2da939a6b4dbe302cfd26a304e1
Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
src/bluetooth-adapter.c

index 0860c19..e0ebc9e 100644 (file)
@@ -1845,6 +1845,7 @@ static int __bt_remove_ad_data_by_type(char **in_data, unsigned int *in_len, cha
                }
        }
 
+       g_free(data);
        BT_ERR("ad_type(0x%02x) data is not set", in_type);
        return BT_ERROR_NONE;
 }