From: wn.jang Date: Fri, 21 May 2021 02:05:26 +0000 (+0900) Subject: Fix bug detected from static analysis tool X-Git-Tag: submit/tizen/20210521.041733^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F97%2F258597%2F1;p=platform%2Fcore%2Fuifw%2Fmulti-assistant-service.git Fix bug detected from static analysis tool Change-Id: I044c80d5d5f291adaed1b49d21a06da621907341 --- diff --git a/src/service_main.cpp b/src/service_main.cpp index 944eed2..44484fe 100644 --- a/src/service_main.cpp +++ b/src/service_main.cpp @@ -1327,10 +1327,16 @@ static void _package_manager_event_cb(const char *type, const char *package, pac if (pkginfo_found) { if (user) { /* Try to get in user packages */ - pkgmgrinfo_appinfo_get_usr_list(handle, PMINFO_ALL_APP, pkg_app_list_cb, (void *)&ret, uid); + ret = pkgmgrinfo_appinfo_get_usr_list(handle, PMINFO_ALL_APP, pkg_app_list_cb, (void *)&ret, uid); + if (ret != PMINFO_R_OK) { + MAS_LOGW("Failed to get usr pkg list from pkginfo, returned %d", ret); + } } else { /* Try to get in global packages */ - pkgmgrinfo_appinfo_get_list(handle, PMINFO_ALL_APP, pkg_app_list_cb, (void *)&ret); + ret pkgmgrinfo_appinfo_get_list(handle, PMINFO_ALL_APP, pkg_app_list_cb, (void *)&ret); + if (ret != PMINFO_R_OK) { + MAS_LOGW("Failed to get pkg list from pkginfo, returned %d", ret); + } } } else { /* Even if we failed acquiring the pkginfo, proceed if we're uninstalling