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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1a90f282-4664-f9e6-45d1-7b3b6a0a3104@web.de>
Date:   Fri, 5 Apr 2019 10:27:59 +0200
From:   Markus Elfring <Markus.Elfring@....de>
To:     Wen Yang <wen.yang99@....com.cn>,
        "David S. Miller" <davem@...emloft.net>,
        kernel-janitors@...r.kernel.org, netdev@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org,
        Murali Karicheri <m-karicheri2@...com>,
        Wingman Kwok <w-kwok2@...com>, Yi Wang <wang.yi59@....com.cn>
Subject: Re: [PATCH 3/3] ethernet: ti: fix possible object reference leak

> @@ -3657,12 +3657,16 @@  static int gbe_probe(struct netcp_device *netcp_device, struct device *dev,
>
>  	ret = netcp_txpipe_init(&gbe_dev->tx_pipe, netcp_device,
>  				gbe_dev->dma_chan_name, gbe_dev->tx_queue_id);
> -	if (ret)
> +	if (ret) {
> +		of_node_put(interfaces);
>  		return ret;
> +	}
>
>  	ret = netcp_txpipe_open(&gbe_dev->tx_pipe);
> -	if (ret)
> +	if (ret) {
> +		of_node_put(interfaces);
>  		return ret;
> +	}
>
>  	/* Create network interfaces */
>  	INIT_LIST_HEAD(&gbe_dev->gbe_intf_head);

Would you like to move such duplicate statements to an additional jump target
for the desired exception handling?

Regards,
Markus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ