diff --git a/lib/iscsi/iscsi.c b/lib/iscsi/iscsi.c index e2912ebaae..35bb4e9569 100644 --- a/lib/iscsi/iscsi.c +++ b/lib/iscsi/iscsi.c @@ -4571,7 +4571,10 @@ remove_acked_pdu(struct spdk_iscsi_conn *conn, uint32_t ExpStatSN) stat_sn = from_be32(&pdu->bhs.stat_sn); if (SN32_LT(stat_sn, conn->exp_statsn)) { TAILQ_REMOVE(&conn->snack_pdu_list, pdu, tailq); - spdk_iscsi_conn_free_pdu(conn, pdu); + if (pdu->task) { + spdk_iscsi_task_put(pdu->task); + } + spdk_put_pdu(pdu); } } }