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: <5cb34dde-fb40-4654-806f-50e0c2ee3579@web.de>
Date: Wed, 9 Apr 2025 17:47:46 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: Abdun Nihaal <abdun.nihaal@...il.com>, netdev@...r.kernel.org
Cc: LKML <linux-kernel@...r.kernel.org>, Andrew Lunn <andrew+netdev@...n.ch>,
 "David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
 Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
 Potnuri Bharat Teja <bharat@...lsio.com>,
 Rahul Lakkireddy <rahul.lakkireddy@...lsio.com>,
 Vishal Kulkarni <vishal@...lsio.com>
Subject: Re: [PATCH net-next] cxgb4: fix memory leak in
 cxgb4_init_ethtool_filters() error path

…
> +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c
> @@ -2270,6 +2270,7 @@ int cxgb4_init_ethtool_filters(struct adapter *adap)
>  		eth_filter->port[i].bmap = bitmap_zalloc(nentries, GFP_KERNEL);
>  		if (!eth_filter->port[i].bmap) {
>  			ret = -ENOMEM;
> +			kvfree(eth_filter->port[i].loc_array);
>  			goto free_eth_finfo;
>  		}
>  	}

How do you think about to move the shown error code assignment behind the mentioned label
(so that another bit of duplicate source code could be avoided)?

Regards,
Markus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ