Re: [PATCH] scsi: fcoe: add missed kfree() in an error path

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

 



> fcoe_fdmi_info() misses to call kfree() in an error path.
> Add the missed function call to fix it.

I suggest to use an additional jump target for the completion
of the desired exception handling.


…
> +++ b/drivers/scsi/fcoe/fcoe.c
> @@ -830,6 +830,7 @@ static void fcoe_fdmi_info(struct fc_lport *lport, struct net_device *netdev)
>  		if (rc) {
>  			printk(KERN_INFO "fcoe: Failed to retrieve FDMI "
>  					"information from netdev.\n");
> +			kfree(fdmi);
>  			return;
>  		}

-			return;
+			goto free_fdmi;


How do you think about to apply any further coding style adjustments?

Regards,
Markus




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux