xbps_configure_pkg: add a safety check.
--HG-- extra : convert_revision : 4e3c7b7a52603baf0e447d1e32f9598df3b5b979
This commit is contained in:
@@ -59,6 +59,9 @@ xbps_configure_pkg(const char *pkgname)
|
|||||||
return EINVAL;
|
return EINVAL;
|
||||||
|
|
||||||
pkgd = xbps_find_pkg_installed_from_plist(pkgname);
|
pkgd = xbps_find_pkg_installed_from_plist(pkgname);
|
||||||
|
if (pkgd == NULL)
|
||||||
|
return ENOENT;
|
||||||
|
|
||||||
prop_dictionary_get_cstring_nocopy(pkgd, "version", &version);
|
prop_dictionary_get_cstring_nocopy(pkgd, "version", &version);
|
||||||
prop_object_release(pkgd);
|
prop_object_release(pkgd);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user