diff options
-rw-r--r-- | ui-popup/src/popup.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/ui-popup/src/popup.c b/ui-popup/src/popup.c index 74af91f..59dfbf8 100644 --- a/ui-popup/src/popup.c +++ b/ui-popup/src/popup.c @@ -174,17 +174,20 @@ static char* __get_pkg_label(const char* pkgid) int ret = pkgmgrinfo_pkginfo_get_pkginfo(pkgid, &handle); if (ret != PMINFO_R_OK) { LOGE("pkgmgrinfo_pkginfo_get_pkginfo() failed. ret = %d, pkgid = %s", ret, pkgid); - return ""; + pkgmgrinfo_pkginfo_destroy_pkginfo(handle); + return strdup(""); } ret = pkgmgrinfo_pkginfo_get_label(handle, &label); if (ret != PMINFO_R_OK) { LOGE("pkgmgrinfo_pkginfo_get_label() failed. ret = %d, pkgid = %s", ret, pkgid); - return ""; + pkgmgrinfo_pkginfo_destroy_pkginfo(handle); + return strdup(""); } char* pkg_label = strdup(label); if (pkg_label == NULL) { LOGE("strdup() of pkg_label failed. pkgid = %s", pkgid); - return ""; + pkgmgrinfo_pkginfo_destroy_pkginfo(handle); + return strdup(""); } pkgmgrinfo_pkginfo_destroy_pkginfo(handle); |