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: <3e154812-3306-1d04-e7d7-9d1f5aef60b6@gmail.com>
Date: Tue, 30 May 2023 10:51:13 +0300
From: Tariq Toukan <ttoukan.linux@...il.com>
To: Christophe JAILLET <christophe.jaillet@...adoo.fr>,
 Saeed Mahameed <saeedm@...dia.com>, Leon Romanovsky <leon@...nel.org>,
 "David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
 Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>
Cc: linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
 netdev@...r.kernel.org, linux-rdma@...r.kernel.org
Subject: Re: [PATCH net-next] net/mlx5e: Remove a useless function call



On 29/05/2023 11:34, Christophe JAILLET wrote:
> 'handle' is known to be NULL here. There is no need to kfree() it.
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
> ---
>   drivers/net/ethernet/mellanox/mlx5/core/en/tc/post_act.c | 4 +---
>   1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/tc/post_act.c b/drivers/net/ethernet/mellanox/mlx5/core/en/tc/post_act.c
> index 0290e0dea539..4e923a2874ae 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en/tc/post_act.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/tc/post_act.c
> @@ -112,10 +112,8 @@ mlx5e_tc_post_act_add(struct mlx5e_post_act *post_act, struct mlx5_flow_attr *po
>   	int err;
>   
>   	handle = kzalloc(sizeof(*handle), GFP_KERNEL);
> -	if (!handle) {
> -		kfree(handle);
> +	if (!handle)
>   		return ERR_PTR(-ENOMEM);
> -	}
>   
>   	post_attr->chain = 0;
>   	post_attr->prio = 0;

Reviewed-by: Tariq Toukan <tariqt@...dia.com>

Thanks for your patch.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ