net/virtio: fix memory leak in mergeable Rx
authorTiwei Bie <tiwei.bie@intel.com>
Thu, 20 Jun 2019 02:34:34 +0000 (10:34 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 20 Jun 2019 21:42:04 +0000 (23:42 +0200)
commit674effd868865edbb06c49119e0ff215498d32b5
treeeedb925491e487f3a6804728f86a6911c645d6af
parent18e8c0fa91fff4e24e27bbbf42d1bdede93b879e
net/virtio: fix memory leak in mergeable Rx

When there is no enough segments for a packet in mergeable
Rx path, we should free the whole mbuf chain instead of just
recycling the last segment.

Fixes: bcac5aa207f8 ("net/virtio: improve batching in mergeable path")
Cc: stable@dpdk.org
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
drivers/net/virtio/virtio_rxtx.c