DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: byron.marohn@intel.com, yipeng1.wang@intel.com
Cc: dev@dpdk.org, jerry.lilijun@huawei.com, xudingke@huawei.com,
	Yunjian Wang <wangyunjian@huawei.com>,
	stable@dpdk.org, wangyunjian <wangyunjian@huawei.com>
Subject: Re: [dpdk-dev] [PATCH] efd: fix tailq entry leak in error path
Date: Tue, 20 Oct 2020 16:10:33 +0200
Message-ID: <2570421.hXoGziszdc@thomas> (raw)
In-Reply-To: <49d4bdc58b81564788cfd31f16ef2e66c1673f6d.1601347917.git.wangyunjian@huawei.com>

Byron, Yipeng,
Please could you review?
Thanks

29/09/2020 05:31, wangyunjian:
> From: Yunjian Wang <wangyunjian@huawei.com>
> 
> In rte_efd_create() allocated memory for tailq entry, we should
> free it when error happens, otherwise it will lead to memory leak.
> 
> Fixes: 56b6ef874f80 ("efd: new Elastic Flow Distributor library")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
> ---
>  lib/librte_efd/rte_efd.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/lib/librte_efd/rte_efd.c b/lib/librte_efd/rte_efd.c
> index 6a799556d..0aa120f48 100644
> --- a/lib/librte_efd/rte_efd.c
> +++ b/lib/librte_efd/rte_efd.c
> @@ -707,6 +707,7 @@ rte_efd_create(const char *name, uint32_t max_num_rules, uint32_t key_len,
>  
>  error_unlock_exit:
>  	rte_mcfg_tailq_write_unlock();
> +	rte_free(te);
>  	rte_efd_free(table);
>  
>  	return NULL;
> 






  reply	other threads:[~2020-10-20 14:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-29  3:31 wangyunjian
2020-10-20 14:10 ` Thomas Monjalon [this message]
2020-10-20 20:24   ` Wang, Yipeng1
2020-10-22 20:06 ` David Marchand

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=2570421.hXoGziszdc@thomas \
    --to=thomas@monjalon.net \
    --cc=byron.marohn@intel.com \
    --cc=dev@dpdk.org \
    --cc=jerry.lilijun@huawei.com \
    --cc=stable@dpdk.org \
    --cc=wangyunjian@huawei.com \
    --cc=xudingke@huawei.com \
    --cc=yipeng1.wang@intel.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

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git