From: Daehyeon Jung Date: Mon, 16 Sep 2019 07:03:04 +0000 (+0900) Subject: Fix static analysis issues X-Git-Tag: accepted/tizen/5.5/unified/20191031.030115^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F83%2F213883%2F1;p=platform%2Fcore%2Fapi%2Fcapability-manager.git Fix static analysis issues Change-Id: I40705944baace152b3093cae7ca280b0df149ddb --- diff --git a/src/client.cc b/src/client.cc index 6dbd7f3..225ab34 100644 --- a/src/client.cc +++ b/src/client.cc @@ -475,6 +475,7 @@ void capmgr_dbus_callback(GVariant* result, void* user_data) { if (!reply->b) { LOG(ERROR) << "Invalid bundle data!"; capmgr_app_control_destroy(cbdata->request); + g_free(data); delete cbdata; return; } @@ -485,6 +486,7 @@ void capmgr_dbus_callback(GVariant* result, void* user_data) { cbdata->user_data); capmgr_app_control_destroy(cbdata->request); + g_free(data); delete cbdata; } diff --git a/src/unit_tests/unit_test.cc b/src/unit_tests/unit_test.cc index f6d53d6..955c154 100644 --- a/src/unit_tests/unit_test.cc +++ b/src/unit_tests/unit_test.cc @@ -46,8 +46,8 @@ int ApplicationForeachCb(const capmgr_app_info_h remote_app_info, char* appid; capmgr_app_info_get_appid(remote_app_info, &appid); - free(appid); LOG(INFO) << appid; + free(appid); return 0; }