fix memory leak accepted/tizen_7.0_unified accepted/tizen_7.0_unified_hotfix tizen_7.0 tizen_7.0_hotfix accepted/tizen/7.0/unified/20221110.055903 accepted/tizen/7.0/unified/hotfix/20221116.105749 accepted/tizen/unified/20220705.211042 submit/tizen/20220704.080759 tizen_7.0_m2_release
authorYoungjae Shin <yj99.shin@samsung.com>
Mon, 4 Jul 2022 08:03:13 +0000 (17:03 +0900)
committerYoungjae Shin <yj99.shin@samsung.com>
Mon, 4 Jul 2022 08:07:38 +0000 (17:07 +0900)
Change-Id: I3d39dc16c44402ca13d48aeb6378c062d58c25bd

app/AppActionLaunch.cpp
bluetooth/BtActionAudioConnect.cpp

index fff0781..ec92b23 100644 (file)
@@ -84,9 +84,12 @@ void AppActionLaunch::undo()
         ERR("app_manager_get_app_context(%s) Fail(%s)", requestVal.c_str(), get_error_message(ret));
         return;
     }
+
     ret = app_manager_terminate_app(runAppContext);
     if (APP_MANAGER_ERROR_NONE != ret)
         ERR("app_manager_terminate_app() Fail(%s)", get_error_message(ret));
+
+    app_context_destroy(runAppContext);
 }
 
 std::string AppActionLaunch::getUndoInfo()
index 9588948..70fffba 100644 (file)
@@ -57,6 +57,7 @@ int BtActionAudioConnect::set(const std::string &val)
         DBG("BT device(%s) is not bonded", val.c_str());
     } else {
         ERR("bt_adapter_get_bonded_device_info() Fail(%s)", get_error_message(ret));
+        bt_adapter_free_device_info(devInfo);
         return MODES_ERROR_SYSTEM;
     }