Be a bit more paranoid by checking allocs and expected types.

This commit is contained in:
Juan RP
2011-12-22 08:23:11 +01:00
parent 1c6794a4e4
commit 5a892023f4
6 changed files with 30 additions and 15 deletions

View File

@ -285,7 +285,7 @@ xbps_set_pkg_state_installed(const char *pkgname,
}
out:
if (dict)
if (prop_object_type(dict) == PROP_TYPE_DICTIONARY)
prop_object_release(dict);
if (metadir)
free(metadir);