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 }