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);
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user