Fix Coverity issue 61/291361/1 accepted/tizen/7.0/unified/20230417.162202
authorAnuj Jain <anuj01.jain@samsung.com>
Wed, 15 Mar 2023 06:46:09 +0000 (12:16 +0530)
committerWootak Jung <wootak.jung@samsung.com>
Fri, 14 Apr 2023 00:19:50 +0000 (09:19 +0900)
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 681c5ca..9b5896d 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;
 }