From: Piotr Kosko
Date: Thu, 20 Sep 2018 06:40:06 +0000 (+0200)
Subject: [Bluetooth] Fixing the memory releasing issue
X-Git-Tag: submit/tizen/20180920.074708^2^2~1
X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1fec04d00442f27bbec233f517b31ad5a5e01634;p=platform%2Fcore%2Fapi%2Fwebapi-plugins.git
[Bluetooth] Fixing the memory releasing issue
[Verification] Code compiles without errors.
TCT passrate 100%.
Change-Id: I4a7b516635b7d2a3bfc96359fa4d51543b0eb4e0
Signed-off-by: Piotr Kosko
---
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);