DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] member: fix memory leak on error
@ 2017-12-21 17:50 Anatoly Burakov
  2017-12-22  0:01 ` Wang, Yipeng1
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Anatoly Burakov @ 2017-12-21 17:50 UTC (permalink / raw)
  To: dev; +Cc: Yipeng Wang, Sameh Gobriel

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-01-18 23:41 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-21 17:50 [dpdk-dev] [PATCH] member: fix memory leak on error 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
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

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).