lib/transaction_commit.c: fix a use-after-free in state cb (found by ojab).

This commit is contained in:
Juan RP 2013-03-26 10:35:20 +01:00
parent e25216822b
commit 7c4f20ba89

View File

@ -88,11 +88,11 @@ check_binpkgs_hash(struct xbps_handle *xhp, prop_object_iterator_t iter)
rv = xbps_file_hash_check(binfile, sha256);
if (rv != 0) {
free(binfile);
free(filen);
xbps_set_cb_state(xhp, XBPS_STATE_VERIFY_FAIL,
rv, pkgver,
"Failed to verify `%s' package integrity: %s",
filen, strerror(rv));
free(filen);
break;
}
free(binfile);