summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYunjin Lee <yunjin-.lee@samsung.com>2020-10-23 15:44:25 +0900
committerYunjin Lee <yunjin-.lee@samsung.com>2020-10-23 15:44:25 +0900
commit6002ffa4d47947892e4227a45a2ac97a440c4b9e (patch)
tree8b76eb24f1a36bc5f1c0cae3be69d007c471f811
parent4de96365fe21073b77d1012b2bc72c103ee716fb (diff)
downloadaskuser-popup-6002ffa4d47947892e4227a45a2ac97a440c4b9e.tar.gz
askuser-popup-6002ffa4d47947892e4227a45a2ac97a440c4b9e.tar.bz2
askuser-popup-6002ffa4d47947892e4227a45a2ac97a440c4b9e.zip
Destroy app info after use
Change-Id: I0943a9c496b344ee5744f27f0cb38b3446876259 Signed-off-by: Yunjin Lee <yunjin-.lee@samsung.com>
-rw-r--r--ui/src/app_main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ui/src/app_main.c b/ui/src/app_main.c
index 138d872..43168c4 100644
--- a/ui/src/app_main.c
+++ b/ui/src/app_main.c
@@ -104,6 +104,7 @@ static void app_control(app_control_h app_control, void *data)
free(caller_appid);
if (ret != APP_MANAGER_ERROR_NONE) {
LOGE("app_info_create() failed. ret = %d", ret);
+ app_info_destroy(app_info);
ui_app_exit();
}
@@ -112,8 +113,10 @@ static void app_control(app_control_h app_control, void *data)
ret = app_info_get_package(app_info, &caller_pkgid);
if (ret != APP_MANAGER_ERROR_NONE) {
LOGE("app_info_get_package() failed. ret = %d", ret);
+ app_info_destroy(app_info);
ui_app_exit();
}
+ app_info_destroy(app_info);
if (!ad->caller_pkgid) {
ad->caller_pkgid = strdup(caller_pkgid);