xbps_configure_pkg: add a safety check.
--HG-- extra : convert_revision : 4e3c7b7a52603baf0e447d1e32f9598df3b5b979
This commit is contained in:
parent
ed711fe8b9
commit
99384e1f5e
1 changed files with 3 additions and 0 deletions
|
@ -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);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue