diff options
-rw-r--r-- | ui/src/app_main.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ui/src/app_main.c b/ui/src/app_main.c index e268534..79eabae 100644 --- a/ui/src/app_main.c +++ b/ui/src/app_main.c @@ -110,6 +110,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(); } @@ -118,8 +119,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); |