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

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

Fixes: a76290c8f1cf ("net/virtio: implement Rx path for packed queues")
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