Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

[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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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 */