xbps-checkvers: always initialize repourl.

This commit is contained in:
Juan RP 2019-06-19 14:00:54 +02:00
parent 818e399a8c
commit e083440b70
No known key found for this signature in database
GPG Key ID: AF19F6CB482F9368

View File

@ -568,9 +568,9 @@ rcv_check_version(rcv_t *rcv)
if (sz < 0 || (size_t)sz >= sizeof srcver)
exit(EXIT_FAILURE);
repourl = NULL;
if (rcv->installed) {
rcv->pkgd = xbps_pkgdb_get_pkg(&rcv->xhp, pkgname);
repourl = NULL;
} else {
rcv->pkgd = xbps_rpool_get_pkg(&rcv->xhp, pkgname);
xbps_dictionary_get_cstring_nocopy(rcv->pkgd, "repository", &repourl);