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)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 19 May 2017 01:37:27 +0000 (21:37 -0400)
commita351e40b6de550049423a26f7ded7b639e363d89
treeb15bb3bc32b9721c0425115b5166ae3d7fc1ccab
parent463f620b1256e0488d932088e04a372817e8c42e
scsi: csiostor: fix use after free in csio_hw_use_fwconfig()

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>
drivers/scsi/csiostor/csio_hw.c