scsi: qla4xxx: fix double free bug
authorPan Bian <bianpan2016@163.com>
Tue, 5 Nov 2019 09:25:27 +0000 (17:25 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 Jan 2020 07:19:43 +0000 (08:19 +0100)
commit2dd06d8b8ed64d197b37db91d40b843596d1c9cb
tree4ba002e9daf0ac37bf4de96a4b90c2c76ffc1f5b
parent501cdba86ce0a767bab5890dbc18204ba6cc8c72
scsi: qla4xxx: fix double free bug

commit 3fe3d2428b62822b7b030577cd612790bdd8c941 upstream.

The variable init_fw_cb is released twice, resulting in a double free
bug. The call to the function dma_free_coherent() before goto is removed to
get rid of potential double free.

Fixes: 2a49a78ed3c8 ("[SCSI] qla4xxx: added IPv6 support.")
Link: https://lore.kernel.org/r/1572945927-27796-1-git-send-email-bianpan2016@163.com
Signed-off-by: Pan Bian <bianpan2016@163.com>
Acked-by: Manish Rangankar <mrangankar@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/qla4xxx/ql4_mbx.c