From: Youngjae Shin Date: Mon, 4 Jul 2022 08:03:13 +0000 (+0900) Subject: fix memory leak X-Git-Tag: submit/tizen/20220704.080759^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Faccepted%2Ftizen_7.0_unified_hotfix;p=platform%2Fcore%2Fsystem%2Fmodes-plugins.git fix memory leak Change-Id: I3d39dc16c44402ca13d48aeb6378c062d58c25bd --- diff --git a/app/AppActionLaunch.cpp b/app/AppActionLaunch.cpp index fff0781..ec92b23 100644 --- a/app/AppActionLaunch.cpp +++ b/app/AppActionLaunch.cpp @@ -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() diff --git a/bluetooth/BtActionAudioConnect.cpp b/bluetooth/BtActionAudioConnect.cpp index 9588948..70fffba 100644 --- a/bluetooth/BtActionAudioConnect.cpp +++ b/bluetooth/BtActionAudioConnect.cpp @@ -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; }