Skip to content

Commit fee92f2

Browse files
Dan Carpentermartinkpetersen
authored andcommitted
scsi: iscsi: qla4xxx: fix double free in probe
On this error path we call qla4xxx_mem_free() and then the caller also calls qla4xxx_free_adapter() which calls qla4xxx_mem_free(). It leads to a couple double frees: drivers/scsi/qla4xxx/ql4_os.c:8856 qla4xxx_probe_adapter() warn: 'ha->chap_dma_pool' double freed drivers/scsi/qla4xxx/ql4_os.c:8856 qla4xxx_probe_adapter() warn: 'ha->fw_ddb_dma_pool' double freed Fixes: afaf5a2 ("[SCSI] Initial Commit of qla4xxx") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 8c850a0 commit fee92f2

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

drivers/scsi/qla4xxx/ql4_os.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4275,7 +4275,6 @@ static int qla4xxx_mem_alloc(struct scsi_qla_host *ha)
42754275
return QLA_SUCCESS;
42764276

42774277
mem_alloc_error_exit:
4278-
qla4xxx_mem_free(ha);
42794278
return QLA_ERROR;
42804279
}
42814280

0 commit comments

Comments
 (0)