_LOG("can not get pkg version[%s]\n",
pkg_info->pkgid);
pkgmgrinfo_pkginfo_destroy_pkginfo(handle);
+ pkgmgr_client_free_pkginfo(pkg_info);
continue;
}
_LOG("can not compare pkg version[%s]\n",
pkg_info->pkgid);
pkgmgrinfo_pkginfo_destroy_pkginfo(handle);
+ pkgmgr_client_free_pkginfo(pkg_info);
continue;
}
/* package version is not update on FOTA. */
_LOG("pkg is not updated\n");
pkgmgrinfo_pkginfo_destroy_pkginfo(handle);
+ pkgmgr_client_free_pkginfo(pkg_info);
gettimeofday(&tv, NULL);
endtime = tv.tv_sec * 1000l +
}
_LOG("pkg is updated, need to upgrade\n");
- pkgmgrinfo_pkginfo_destroy_pkginfo(handle);
} else {
char flag_path[BUF_SIZE] = { 0, };
snprintf(flag_path, BUF_SIZE, "%s/%s",
total_time += (int)(endtime - starttime);
_LOG("finish request [time : %d ms]\n",
(int)(endtime - starttime));
+ pkgmgr_client_free_pkginfo(pkg_info);
continue;
}
else
_LOG("fail request : %d\n", ret);
- pkgmgr_client_free_pkginfo(pkg_info);
+ if (pkg_info)
+ pkgmgr_client_free_pkginfo(pkg_info);
+ if (handle)
+ pkgmgrinfo_pkginfo_destroy_pkginfo(handle);
gettimeofday(&tv, NULL);
endtime = tv.tv_sec * 1000l + tv.tv_usec / 1000l;