{
char *req_key = NULL;
int ret =0;
- pkgmgrinfo_pkginfo_h handle;
+ pkgmgrinfo_pkginfo_h handle = NULL;
char *pkgtype = NULL;
char *installer_path = NULL;
char *argv[PKG_ARGC_MAX] = { NULL, };
if(args)
free(args);
- pkgmgrinfo_pkginfo_destroy_pkginfo(handle);
+ if (handle)
+ pkgmgrinfo_pkginfo_destroy_pkginfo(handle);
return ret;
}
char *pkgtype;
char *req_key = NULL;
int ret;
- pkgmgrinfo_pkginfo_h handle;
+ pkgmgrinfo_pkginfo_h handle = NULL;
int pid = -1;
/* Check for NULL value of pc */
catch:
if (req_key)
free(req_key);
- pkgmgrinfo_pkginfo_destroy_pkginfo(handle);
+ if (handle)
+ pkgmgrinfo_pkginfo_destroy_pkginfo(handle);
return ret;
/* 1. check argument */
retv_if(pkgid == NULL, PKGMGR_R_EINVAL);
- pkgmgrinfo_pkginfo_h handle;
+ pkgmgrinfo_pkginfo_h handle = NULL;
ret = pkgmgrinfo_pkginfo_get_usr_pkginfo(pkgid, uid, &handle);
/*check package id */
if(args)
free(args);
- pkgmgrinfo_pkginfo_destroy_pkginfo(handle);
+ if (handle)
+ pkgmgrinfo_pkginfo_destroy_pkginfo(handle);
return ret;
}
/* 1. check argument */
retv_if(pkgid == NULL, PKGMGR_R_EINVAL);
- pkgmgrinfo_pkginfo_h handle;
+ pkgmgrinfo_pkginfo_h handle = NULL;
if (uid != GLOBAL_USER)
ret = pkgmgrinfo_pkginfo_get_usr_pkginfo(pkgid, uid, &handle);
else
if(args)
free(args);
- pkgmgrinfo_pkginfo_destroy_pkginfo(handle);
+ if (handle)
+ pkgmgrinfo_pkginfo_destroy_pkginfo(handle);
return ret;
}