[net] virtio-net: fix leaking of ctx array
diff mbox series

Message ID 1499428569-1608-1-git-send-email-jasowang@redhat.com
State New, archived
Headers show
Series
  • [net] virtio-net: fix leaking of ctx array
Related show

Commit Message

Jason Wang July 7, 2017, 11:56 a.m. UTC
Fixes: commit d45b897b11ea ("virtio_net: allow specifying context for rx")
Signed-off-by: Jason Wang <jasowang@redhat.com>
---
 drivers/net/virtio_net.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Michael S. Tsirkin July 7, 2017, 3:48 p.m. UTC | #1
On Fri, Jul 07, 2017 at 07:56:09PM +0800, Jason Wang wrote:
> 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>

Needed for stable as well.

Thanks Jason.

> ---
>  drivers/net/virtio_net.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
> index 2e69bcd..99a26a9 100644
> --- a/drivers/net/virtio_net.c
> +++ b/drivers/net/virtio_net.c
> @@ -2229,6 +2229,7 @@ static int virtnet_find_vqs(struct virtnet_info *vi)
>  	kfree(names);
>  	kfree(callbacks);
>  	kfree(vqs);
> +	kfree(ctx);
>  
>  	return 0;
>  
> -- 
> 2.7.4
David Miller July 7, 2017, 7:04 p.m. UTC | #2
From: Jason Wang <jasowang@redhat.com>
Date: Fri,  7 Jul 2017 19:56:09 +0800

> Fixes: commit d45b897b11ea ("virtio_net: allow specifying context for rx")
> Signed-off-by: Jason Wang <jasowang@redhat.com>

Applied and queued up for -stable, thanks Jason.

Patch
diff mbox series

diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 2e69bcd..99a26a9 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -2229,6 +2229,7 @@  static int virtnet_find_vqs(struct virtnet_info *vi)
 	kfree(names);
 	kfree(callbacks);
 	kfree(vqs);
+	kfree(ctx);
 
 	return 0;