_D("Unregistering the Account Provider.");
char* app_id = NULL;
- int get_appid_ret = pkgmgrinfo_appinfo_get_appid(package_info_handle, &app_id);
+ int pkgmgr_ret = -1;
+
+ pkgmgr_ret = pkgmgrinfo_appinfo_get_appid(package_info_handle, &app_id);
+ retvm_if((pkgmgr_ret != PMINFO_R_OK || !app_id), pkgmgr_ret, "Error fetching app id");
- retvm_if(get_appid_ret == PMINFO_R_ERROR, PMINFO_R_ERROR, "Error fetching app id");
_D("appid : %s", app_id);
int ret = ACCOUNT_ERROR_NONE;
int ret = ACCOUNT_ERROR_NONE;
char* app_id = NULL;
uid_t uid = -1;
- pkgmgrinfo_appinfo_get_appid(handle, &app_id);
+ int pkgmgr_ret = -1;
+
+ pkgmgr_ret = pkgmgrinfo_appinfo_get_appid(handle, &app_id);
+ retvm_if((pkgmgr_ret != PMINFO_R_OK || !app_id), pkgmgr_ret, "Error fetching app id");
+
_D("appid : %s", app_id);
if (pkgmgr_installer_info_get_target_uid(&uid) < 0) {