virtio-net: fix leaking of ctx array
authorJason Wang <jasowang@redhat.com>
Fri, 7 Jul 2017 11:56:09 +0000 (19:56 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 7 Jul 2017 19:03:41 +0000 (20:03 +0100)
Fixes: commit d45b897b11ea ("virtio_net: allow specifying context for rx")
Signed-off-by: Jason Wang <jasowang@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/virtio_net.c

index 2e69bcd..99a26a9 100644 (file)
@@ -2229,6 +2229,7 @@ static int virtnet_find_vqs(struct virtnet_info *vi)
        kfree(names);
        kfree(callbacks);
        kfree(vqs);
+       kfree(ctx);
 
        return 0;