plist.c: fix a leak.

--HG--
extra : convert_revision : 171210c3073d197c2ae3f1f0545bc9b95a6a5484
This commit is contained in:
Juan RP 2008-12-26 14:21:34 +01:00
parent 13a05a18b9
commit 1741d889bc

View File

@ -219,12 +219,17 @@ xbps_remove_pkg_dict_from_file(const char *pkg, const char *plist)
}
prop_object_iterator_release(iter);
prop_object_release(pdict);
errno = ENODEV;
return false;
wr_plist:
if (!prop_dictionary_externalize_to_file(pdict, plist))
if (!prop_dictionary_externalize_to_file(pdict, plist)) {
prop_object_release(pdict);
return false;
}
prop_object_release(pdict);
return true;
}