Commit 841f97bf authored by Dan Carpenter's avatar Dan Carpenter Committed by James Bottomley

[SCSI] qla2xxx: don't free pool that wasn't allocated

In the original code, if dma_pool_alloc() fails then we call
dma_pool_free().  It causes an error, possibly a NULL dereference.
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarChad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
parent 83ff74e3
...@@ -2382,7 +2382,7 @@ qla82xx_start_scsi(srb_t *sp) ...@@ -2382,7 +2382,7 @@ qla82xx_start_scsi(srb_t *sp)
if (!ctx->fcp_cmnd) { if (!ctx->fcp_cmnd) {
ql_log(ql_log_fatal, vha, 0x3011, ql_log(ql_log_fatal, vha, 0x3011,
"Failed to allocate fcp_cmnd for cmd=%p.\n", cmd); "Failed to allocate fcp_cmnd for cmd=%p.\n", cmd);
goto queuing_error_fcp_cmnd; goto queuing_error;
} }
/* Initialize the DSD list and dma handle */ /* Initialize the DSD list and dma handle */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment