git.droids-corp.org
/
dpdk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9ac7f8e
)
member: fix memory leak on error
author
Anatoly Burakov
<anatoly.burakov@intel.com>
Fri, 12 Jan 2018 17:23:16 +0000
(17:23 +0000)
committer
Thomas Monjalon
<thomas@monjalon.net>
Thu, 18 Jan 2018 23:43:56 +0000
(
00:43
+0100)
rte_member may have allocated a tailq entry or setum before failure,
so free them.
Fixes:
857ed6c68cf2
("member: implement main API")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Yipeng Wang <yipeng1.wang@intel.com>
lib/librte_member/rte_member.c
patch
|
blob
|
history
diff --git
a/lib/librte_member/rte_member.c
b/lib/librte_member/rte_member.c
index
ab76d77
..
e147dd1
100644
(file)
--- a/
lib/librte_member/rte_member.c
+++ b/
lib/librte_member/rte_member.c
@@
-162,8
+162,9
@@
rte_member_create(const struct rte_member_parameters *params)
return setsum;
error_unlock_exit:
+ rte_free(te);
+ rte_free(setsum);
rte_rwlock_write_unlock(RTE_EAL_TAILQ_RWLOCK);
- rte_member_free(setsum);
return NULL;
}