From 1fec04d00442f27bbec233f517b31ad5a5e01634 Mon Sep 17 00:00:00 2001
From: Piotr Kosko
Date: Thu, 20 Sep 2018 08:40:06 +0200
Subject: [PATCH] [Bluetooth] Fixing the memory releasing issue
[Verification] Code compiles without errors.
TCT passrate 100%.
Change-Id: I4a7b516635b7d2a3bfc96359fa4d51543b0eb4e0
Signed-off-by: Piotr Kosko
---
src/bluetooth/bluetooth_health_profile_handler.cc | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/bluetooth/bluetooth_health_profile_handler.cc b/src/bluetooth/bluetooth_health_profile_handler.cc
index 2aeacb58..06a1f906 100644
--- a/src/bluetooth/bluetooth_health_profile_handler.cc
+++ b/src/bluetooth/bluetooth_health_profile_handler.cc
@@ -238,6 +238,7 @@ void BluetoothHealthProfileHandler::RegisterSinkApp(const picojson::value& data,
switch (ret) {
case BT_ERROR_NONE: {
LoggerD("Registered app: %s", app_id);
+ std::unique_ptr app_id_ptr(app_id, &std::free);
this->registered_health_apps_.insert(app_id);
--
2.34.1