cxgbei: Don't leak resources for an aborted target transfer.

Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D29911
This commit is contained in:
John Baldwin 2021-05-14 12:17:26 -07:00
parent a1c687347a
commit 4add8e4c89

View File

@ -1153,7 +1153,8 @@ icl_cxgbei_conn_transfer_done(struct icl_conn *ic, void *arg)
{
struct ctl_scsiio *ctsio = arg;
if (ctsio != NULL && ctsio->kern_data_len == ctsio->ext_data_filled) {
if (ctsio != NULL && (ctsio->kern_data_len == ctsio->ext_data_filled ||
ic->ic_disconnecting)) {
struct ppod_reservation *prsv;
prsv = io_to_ppod_reservation(ctsio);