Browse Source

[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>
Dan Carpenter 13 years ago
parent
commit
841f97bffc
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/scsi/qla2xxx/qla_iocb.c

+ 1 - 1
drivers/scsi/qla2xxx/qla_iocb.c

@@ -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 */