lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 7 Jul 2020 13:38:25 +0200
From:   Markus Elfring <Markus.Elfring@....de>
To:     Jing Xiangfeng <jingxiangfeng@...wei.com>,
        linux-scsi@...r.kernel.org
Cc:     kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org,
        Hannes Reinecke <hare@...e.de>,
        "James E. J. Bottomley" <jejb@...ux.ibm.com>,
        "Martin K. Petersen" <martin.petersen@...cle.com>,
        Neerav Parikh <Neerav.Parikh@...el.com>,
        Robert Love <robert.w.love@...el.com>
Subject: Re: [PATCH] scsi: fcoe: add missed kfree() in an error path

> 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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ