netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Simon Horman <simon.horman@corigine.com>
To: Zhengchao Shao <shaozhengchao@huawei.com>
Cc: netdev@vger.kernel.org, linux-rdma@vger.kernel.org,
	davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, saeedm@nvidia.com, leon@kernel.org,
	tariqt@nvidia.com, lkayal@nvidia.com, weiyongjun1@huawei.com,
	yuehaibing@huawei.com
Subject: Re: [PATCH net] net/mlx5: fix potential memory leak in mlx5e_init_rep_rx
Date: Sat, 8 Jul 2023 15:40:50 +0100	[thread overview]
Message-ID: <ZKl1cgLB5mLXB/R7@corigine.com> (raw)
In-Reply-To: <20230708071307.149100-1-shaozhengchao@huawei.com>

[Correct lkayal@nvidia.com email address]

On Sat, Jul 08, 2023 at 03:13:07PM +0800, Zhengchao Shao wrote:
> The memory pointed to by the priv->rx_res pointer is not freed in the error
> path of mlx5e_init_rep_rx, which can lead to a memory leak. Fix by freeing
> the memory in the error path, thereby making the error path identical to
> mlx5e_cleanup_rep_rx().
> 
> Fixes: af8bbf730068 ("net/mlx5e: Convert mlx5e_flow_steering member of mlx5e_priv to pointer")
> Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>

Reviewed-by: Simon Horman <simon.horman@corigine.com>


  reply	other threads:[~2023-07-08 14:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-08  7:13 [PATCH net] net/mlx5: fix potential memory leak in mlx5e_init_rep_rx Zhengchao Shao
2023-07-08 14:40 ` Simon Horman [this message]
2023-07-09 10:18 ` Tariq Toukan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZKl1cgLB5mLXB/R7@corigine.com \
    --to=simon.horman@corigine.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=lkayal@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=saeedm@nvidia.com \
    --cc=shaozhengchao@huawei.com \
    --cc=tariqt@nvidia.com \
    --cc=weiyongjun1@huawei.com \
    --cc=yuehaibing@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).