git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
pdump: fix possible mbuf leak on failure
[dpdk.git]
/
lib
/
librte_pdump
/
rte_pdump.c
diff --git
a/lib/librte_pdump/rte_pdump.c
b/lib/librte_pdump/rte_pdump.c
index
e6182d3
..
fec49b5
100644
(file)
--- a/
lib/librte_pdump/rte_pdump.c
+++ b/
lib/librte_pdump/rte_pdump.c
@@
-153,6
+153,8
@@
pdump_pktmbuf_copy(struct rte_mbuf *m, struct rte_mempool *mp)
do {
nseg++;
if (pdump_pktmbuf_copy_data(seg, m) < 0) {
+ if (seg != m_dup)
+ rte_pktmbuf_free_seg(seg);
rte_pktmbuf_free(m_dup);
return NULL;
}