virtio_dev_free_mbufs was recently modified to free the
virtqueues but failed to check whether the array was
allocated. Added a check to ensure vqs was non-null.
Fixes:
bdb32afbb610 ("net/virtio: rationalize queue flushing")
Signed-off-by: David Harton <dharton@cisco.com>
Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
struct rte_mbuf *buf;
int queue_type;
+ if (hw->vqs == NULL)
+ return;
+
for (i = 0; i < nr_vq; i++) {
vq = hw->vqs[i];
if (!vq)