提交 841f97bf 编写于 作者: D Dan Carpenter 提交者: 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: NDan Carpenter <dan.carpenter@oracle.com>
Acked-by: NChad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
上级 83ff74e3
......@@ -2382,7 +2382,7 @@ qla82xx_start_scsi(srb_t *sp)
if (!ctx->fcp_cmnd) {
ql_log(ql_log_fatal, vha, 0x3011,
"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 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册