On Tue, Feb 13, 2018 at 01:08:37PM +0800, linzhecheng wrote:
> g_free() was moved from vhost_net_cleanup in commit e6bcb1b, so we should
> free net after vhost_net_cleanup
> 
> Signed-off-by: linzhecheng <linzhech...@huawei.com>

Looks like this needs a Fixes: tag and CC stable - is that right?

> diff --git a/net/vhost-user.c b/net/vhost-user.c
> index cb45512506..d024573e45 100644
> --- a/net/vhost-user.c
> +++ b/net/vhost-user.c
> @@ -109,6 +109,7 @@ static int vhost_user_start(int queues, NetClientState 
> *ncs[], CharBackend *be)
>  err:
>      if (net) {
>          vhost_net_cleanup(net);
> +        g_free(net);
>      }
>      vhost_user_stop(i, ncs);
>      return -1;
> -- 
> 2.12.2.windows.2
> 

Reply via email to