diff options
author | Quinn Tran <qutran@marvell.com> | 2019-11-05 16:06:52 +0100 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2019-11-09 03:15:41 +0100 |
commit | af2a0c51b1205327f55a7e82e530403ae1d42cbb (patch) | |
tree | 1831d41824312cfbdd8d8dcbb81cd00b303be83d /drivers/scsi/qla2xxx/qla_mbx.c | |
parent | scsi: qla2xxx: Do command completion on abort timeout (diff) | |
download | linux-af2a0c51b1205327f55a7e82e530403ae1d42cbb.tar.xz linux-af2a0c51b1205327f55a7e82e530403ae1d42cbb.zip |
scsi: qla2xxx: Fix SRB leak on switch command timeout
when GPSC/GPDB switch command fails, driver just returns without doing a
proper cleanup. This patch fixes this memory leak by calling sp->free() in
the error path.
Link: https://lore.kernel.org/r/20191105150657.8092-4-hmadhani@marvell.com
Reviewed-by: Ewan D. Milne <emilne@redhat.com>
Signed-off-by: Quinn Tran <qutran@marvell.com>
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_mbx.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_mbx.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c index d4d75bcdac73..4eb88c3ee08e 100644 --- a/drivers/scsi/qla2xxx/qla_mbx.c +++ b/drivers/scsi/qla2xxx/qla_mbx.c @@ -6287,17 +6287,13 @@ int qla24xx_send_mb_cmd(struct scsi_qla_host *vha, mbx_cmd_t *mcp) case QLA_SUCCESS: ql_dbg(ql_dbg_mbx, vha, 0x119d, "%s: %s done.\n", __func__, sp->name); - sp->free(sp); break; default: ql_dbg(ql_dbg_mbx, vha, 0x119e, "%s: %s Failed. %x.\n", __func__, sp->name, rval); - sp->free(sp); break; } - return rval; - done_free_sp: sp->free(sp); done: |