DPDK patches and discussions
 help / color / mirror / Atom feed
From: wangyunjian <wangyunjian@huawei.com>
To: "dev@dpdk.org" <dev@dpdk.org>
Cc: "jia.guo@intel.com" <jia.guo@intel.com>,
	"Lilijun (Jerry)" <jerry.lilijun@huawei.com>,
	xudingke <xudingke@huawei.com>,
	"stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v4 1/3] eal: fix memory leak when removing event_cb
Date: Wed, 29 Jul 2020 11:47:04 +0000
Message-ID: <34EFBCA9F01B0748BEB6B629CE643AE60D0F2D4B@dggemm513-mbx.china.huawei.com> (raw)
In-Reply-To: <aa1c5c1da8151295c3df0402dab6901b9fbe0bc9.1593768308.git.wangyunjian@huawei.com>

Ping for review.

Thanks,
Yunjian

> -----Original Message-----
> From: wangyunjian
> Sent: Friday, July 3, 2020 5:46 PM
> To: dev@dpdk.org
> Cc: jia.guo@intel.com; Lilijun (Jerry) <jerry.lilijun@huawei.com>; xudingke
> <xudingke@huawei.com>; wangyunjian <wangyunjian@huawei.com>;
> stable@dpdk.org
> Subject: [dpdk-dev] [PATCH v4 1/3] eal: fix memory leak when removing
> event_cb
> 
> From: Yunjian Wang <wangyunjian@huawei.com>
> 
> The event_cb->dev_name is not freed when freeing event_cb, and this causes a
> memory leak.
> 
> Fixes: a753e53d517b ("eal: add device event monitor framework")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
> ---
>  lib/librte_eal/common/eal_common_dev.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/lib/librte_eal/common/eal_common_dev.c
> b/lib/librte_eal/common/eal_common_dev.c
> index 9e4f09d..363a2ca 100644
> --- a/lib/librte_eal/common/eal_common_dev.c
> +++ b/lib/librte_eal/common/eal_common_dev.c
> @@ -526,6 +526,7 @@ static int cmp_dev_name(const struct rte_device *dev,
> const void *_name)
>  		 */
>  		if (event_cb->active == 0) {
>  			TAILQ_REMOVE(&dev_event_cbs, event_cb, next);
> +			free(event_cb->dev_name);
>  			free(event_cb);
>  			ret++;
>  		} else {
> --
> 1.8.3.1
> 


  reply	other threads:[~2020-07-29 11:47 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-03  9:44 [dpdk-dev] [PATCH v4 0/3] fixes for device event wangyunjian
2020-07-03  9:46 ` [dpdk-dev] [PATCH v4 1/3] eal: fix memory leak when removing event_cb wangyunjian
2020-07-29 11:47   ` wangyunjian [this message]
2020-07-30  2:57     ` Jeff Guo
2020-07-03  9:46 ` [dpdk-dev] [PATCH v4 2/3] eal: return error code when failure wangyunjian
2020-07-03  9:46 ` [dpdk-dev] [PATCH v4 3/3] eal: fix a wrong returned value when callback exists wangyunjian
2020-10-20 13:18   ` [dpdk-dev] [dpdk-stable] " David Marchand
2020-10-20 14:31     ` wangyunjian
2020-09-03  3:33 ` [dpdk-dev] [PATCH v4 0/3] fixes for device event wangyunjian
2020-10-21 11:18 ` [dpdk-dev] [PATCH v5 " wangyunjian
2020-10-21 11:19   ` [dpdk-dev] [PATCH v5 1/3] eal: fix memory leak when removing event_cb wangyunjian
2020-10-21 11:19   ` [dpdk-dev] [PATCH v5 2/3] eal: return error code when failure wangyunjian
2020-10-22 12:51     ` David Marchand
2020-10-23  9:05       ` wangyunjian
2020-10-21 11:19   ` [dpdk-dev] [PATCH v5 3/3] eal: fix a wrong returned value when callback exists wangyunjian
2020-10-22 12:55     ` David Marchand
2020-10-23  9:05       ` wangyunjian
2020-10-23 11:37   ` [dpdk-dev] [PATCH v5 0/3] fixes for device event 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=34EFBCA9F01B0748BEB6B629CE643AE60D0F2D4B@dggemm513-mbx.china.huawei.com \
    --to=wangyunjian@huawei.com \
    --cc=dev@dpdk.org \
    --cc=jerry.lilijun@huawei.com \
    --cc=jia.guo@intel.com \
    --cc=stable@dpdk.org \
    --cc=xudingke@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

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