Re: [patch 1/2] be2iscsi: memory leak on error path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06/10/2010 02:52 AM, Dan Carpenter wrote:
I added a kfree(pwrb_arr) in front of the return.

Signed-off-by: Dan Carpenter<error27@xxxxxxxxx>

diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
index dd5b105..779e1d1 100644
--- a/drivers/scsi/be2iscsi/be_main.c
+++ b/drivers/scsi/be2iscsi/be_main.c
@@ -2750,6 +2750,7 @@ beiscsi_create_wrb_rings(struct beiscsi_hba *phba,
  		if (status != 0) {
  			shost_printk(KERN_ERR, phba->shost,
  				     "wrbq create failed.");
+			kfree(pwrb_arr);
  			return status;
  		}
  		phwi_ctrlr->wrb_context[i * 2].cid = phwi_context->be_wrbq[i].


Looks good. Thanks.

Reviewed-by: Mike Christie <michaelc@xxxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux