From: "Wang, Yipeng1" <yipeng1.wang@intel.com>
To: "Burakov, Anatoly" <anatoly.burakov@intel.com>,
"dev@dpdk.org" <dev@dpdk.org>
Cc: "Gobriel, Sameh" <sameh.gobriel@intel.com>,
"De Lara Guarch, Pablo" <pablo.de.lara.guarch@intel.com>
Subject: Re: [dpdk-dev] [PATCH] member: fix memory leak on error
Date: Fri, 22 Dec 2017 00:07:52 +0000 [thread overview]
Message-ID: <D2C4A16CA39F7F4E8E384D204491D7A6445B1F7A@ORSMSX105.amr.corp.intel.com> (raw)
In-Reply-To: <5c0a540f8917604a86e18f8da77fa0c2013b7fde.1513865858.git.anatoly.burakov@intel.com>
Btw, Pablo, since I remember I refer to the EFD library on my membership implementation, does EFD have similar memory leakage issue that not releasing te when failure?
Thanks
>-----Original Message-----
>From: Wang, Yipeng1
>Sent: Thursday, December 21, 2017 4:01 PM
>To: Burakov, Anatoly <anatoly.burakov@intel.com>; dev@dpdk.org
>Cc: Gobriel, Sameh <sameh.gobriel@intel.com>
>Subject: RE: [PATCH] member: fix memory leak on error
>
>Thank you Anatoly for finding this issue. In the code I tried to reuse the
>rte_member_free function to free memory but it may not be executed
>through.
>
>Because of this, I may not properly release setsum struct neither. I will post a
>fix for both soon.
>
>Thanks
>
>>-----Original Message-----
>>From: Burakov, Anatoly
>>Sent: Thursday, December 21, 2017 9:51 AM
>>To: dev@dpdk.org
>>Cc: Wang, Yipeng1 <yipeng1.wang@intel.com>; Gobriel, Sameh
>><sameh.gobriel@intel.com>
>>Subject: [PATCH] member: fix memory leak on error
>>
>>rte_member may have allocated a tailq entry before failure, so
>>free it.
>>
>>Fixes: 857ed6c68cf2 ("member: implement main API")
>>Cc: yipeng1.wang@intel.com
>>Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
>>---
>> lib/librte_member/rte_member.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>>diff --git a/lib/librte_member/rte_member.c
>>b/lib/librte_member/rte_member.c
>>index cc9ea84..569fff9 100644
>>--- a/lib/librte_member/rte_member.c
>>+++ b/lib/librte_member/rte_member.c
>>@@ -191,6 +191,7 @@ rte_member_create(const struct
>>rte_member_parameters *params)
>> return setsum;
>>
>> error_unlock_exit:
>>+ rte_free(te);
>> rte_rwlock_write_unlock(RTE_EAL_TAILQ_RWLOCK);
>> rte_member_free(setsum);
>> return NULL;
>>--
>>2.7.4
next prev parent reply other threads:[~2017-12-22 0:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-21 17:50 Anatoly Burakov
2017-12-22 0:01 ` Wang, Yipeng1
2017-12-22 9:20 ` Burakov, Anatoly
2017-12-22 18:33 ` Wang, Yipeng1
2017-12-23 11:55 ` Burakov, Anatoly
2017-12-26 17:23 ` Wang, Yipeng1
2017-12-22 0:07 ` Wang, Yipeng1 [this message]
2018-01-12 17:23 ` [dpdk-dev] [PATCH v2] " Anatoly Burakov
2018-01-16 17:14 ` Wang, Yipeng1
2018-01-18 23:40 ` Thomas Monjalon
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=D2C4A16CA39F7F4E8E384D204491D7A6445B1F7A@ORSMSX105.amr.corp.intel.com \
--to=yipeng1.wang@intel.com \
--cc=anatoly.burakov@intel.com \
--cc=dev@dpdk.org \
--cc=pablo.de.lara.guarch@intel.com \
--cc=sameh.gobriel@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
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).