forked from Minki/linux
[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: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Chad Dupuis <chad.dupuis@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
This commit is contained in:
parent
83ff74e338
commit
841f97bffc
@ -2382,7 +2382,7 @@ sufficient_dsds:
|
||||
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 */
|
||||
|
Loading…
Reference in New Issue
Block a user