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

2014-11-19 Thread arei.gonglei
From: Gonglei 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 Signed-off-by: Gonglei --- net/slirp.c | 3 +-- 1 file

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 > > 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: Ale

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 > > 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 sta