Re: [Qemu-devel] [PATCH v2] vhost-user: fix memory leak

2018-02-13 Thread Philippe Mathieu-Daudé
On 02/13/2018 02:08 AM, 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 Reviewed-by: Philippe Mathieu-Daudé > > diff --git a/net/vhost-user.c b/net/vhost-user.c > index cb45512506.

Re: [Qemu-devel] [PATCH v2] vhost-user: fix memory leak

2018-02-13 Thread Marc-André Lureau
On Tue, Feb 13, 2018 at 6:08 AM, 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 This can be reproduced and catched by ASAN too: ==11833==ERROR: LeakSanitizer: detected memory leaks

Re: [Qemu-devel] [PATCH v2] vhost-user: fix memory leak

2018-02-13 Thread Michael S. Tsirkin
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 Looks like this needs a Fixes: tag and CC stable - is that right? > diff --git a/net/vhost-u

[Qemu-devel] [PATCH v2] vhost-user: fix memory leak

2018-02-12 Thread linzhecheng
g_free() was moved from vhost_net_cleanup in commit e6bcb1b, so we should free net after vhost_net_cleanup Signed-off-by: linzhecheng 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