Re: [Qemu-devel] [PATCH 1/4] net/slirp: fix memory leak

2014-11-20 Thread Stefan Hajnoczi
On Thu, Nov 20, 2014 at 01:57:11PM +0800, arei.gong...@huawei.com wrote: From: Gonglei arei.gong...@huawei.com commit b412eb61 introduce 'cmd:' target for guestfwd, and fwd don't be used in this scenario, and will leak memory in true branch with 'cmd:'. Let's allocate memory for fwd

[Qemu-devel] [PATCH 1/4] net/slirp: fix memory leak

2014-11-19 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com commit b412eb61 introduce 'cmd:' target for guestfwd, and fwd don't be used in this scenario, and will leak memory in true branch with 'cmd:'. Let's allocate memory for fwd variable just in else statement. Cc: Alexander Graf ag...@suse.de Signed-off-by:

Re: [Qemu-devel] [PATCH 1/4] net/slirp: fix memory leak

2014-11-19 Thread Jason Wang
On 11/20/2014 01:57 PM, arei.gong...@huawei.com wrote: From: Gonglei arei.gong...@huawei.com commit b412eb61 introduce 'cmd:' target for guestfwd, and fwd don't be used in this scenario, and will leak memory in true branch with 'cmd:'. Let's allocate memory for fwd variable just in else