pdump: fix possible mbuf leak on failure
authorIlya V. Matveychikov <matvejchikov@gmail.com>
Fri, 10 Nov 2017 13:55:16 +0000 (16:55 +0300)
committerThomas Monjalon <thomas@monjalon.net>
Sun, 12 Nov 2017 03:15:54 +0000 (04:15 +0100)
commitef1d0e390e056916438ad74c4fa0333c3f09aaa6
tree7994cd322d83bdce257c48a6c5e65cff9c10ec2d
parent4c20622a95087b42ddb403406d3877a9dc3d731b
pdump: fix possible mbuf leak on failure

If pdump_pktmbuf_copy_data() fails it's possible to have segment leak
as rte_pktmbuf_free() only handles m_dup chain but not the seg just
allocated and yet not chained.

Fixes: 278f945402c5 ("pdump: add new library for packet capture")

Signed-off-by: Ilya V. Matveychikov <matvejchikov@gmail.com>
lib/librte_pdump/rte_pdump.c