From dbddbfeec34bb644c8cb4cc9dbc02b19ca1abe8f Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sat, 16 Mar 2019 20:59:18 -0700 Subject: [PATCH] Bluetooth: don't free a resource created by new Found via LGTM.com Signed-off-by: Dirk Hohndel --- core/btdiscovery.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/btdiscovery.cpp b/core/btdiscovery.cpp index 578264b48..5630e48e1 100644 --- a/core/btdiscovery.cpp +++ b/core/btdiscovery.cpp @@ -148,7 +148,7 @@ BTDiscovery::~BTDiscovery() { m_instance = NULL; #if defined(BT_SUPPORT) - free(discoveryAgent); + delete discoveryAgent; #endif }