scsi: csiostor: fix use after free in csio_hw_use_fwconfig()
authorVarun Prakash <varun@chelsio.com>
Wed, 17 May 2017 15:00:43 +0000 (20:30 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 13 Apr 2018 17:50:08 +0000 (19:50 +0200)
commit59cb416436f440aae2fb10fb020239d1131825e0
tree3efeaf692472bd43a85b43cbc646e7073137f1b0
parent76751d98394f337b05713e8ef9836b86b19e7f7e
scsi: csiostor: fix use after free in csio_hw_use_fwconfig()

[ Upstream commit a351e40b6de550049423a26f7ded7b639e363d89 ]

mbp pointer is passed to csio_hw_validate_caps() so call mempool_free()
after calling csio_hw_validate_caps().

Signed-off-by: Varun Prakash <varun@chelsio.com>
Fixes: 541c571fa2fd ("csiostor:Use firmware version from cxgb4/t4fw_version.h")
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/csiostor/csio_hw.c