lib/transaction_commit.c: fix a use-after-free in state cb (found by ojab).
This commit is contained in:
parent
e25216822b
commit
7c4f20ba89
@ -88,11 +88,11 @@ check_binpkgs_hash(struct xbps_handle *xhp, prop_object_iterator_t iter)
|
|||||||
rv = xbps_file_hash_check(binfile, sha256);
|
rv = xbps_file_hash_check(binfile, sha256);
|
||||||
if (rv != 0) {
|
if (rv != 0) {
|
||||||
free(binfile);
|
free(binfile);
|
||||||
free(filen);
|
|
||||||
xbps_set_cb_state(xhp, XBPS_STATE_VERIFY_FAIL,
|
xbps_set_cb_state(xhp, XBPS_STATE_VERIFY_FAIL,
|
||||||
rv, pkgver,
|
rv, pkgver,
|
||||||
"Failed to verify `%s' package integrity: %s",
|
"Failed to verify `%s' package integrity: %s",
|
||||||
filen, strerror(rv));
|
filen, strerror(rv));
|
||||||
|
free(filen);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
free(binfile);
|
free(binfile);
|
||||||
|
Loading…
Reference in New Issue
Block a user