Re: [Qemu-devel] [PATCH 1/9] l2tpv3: fix fd leak

2014-11-18 Thread Gonglei
On 2014/11/18 15:50, Markus Armbruster wrote: > Michael Tokarev writes: > >> 15.11.2014 13:06, arei.gong...@huawei.com wrote: >>> From: Gonglei >>> >>> In this false branch, fd will leak when it is zero. >>> Change the testing condition. >> >> Why fd==0 is a concern here? It is a very unlikely

Re: [Qemu-devel] [PATCH 1/9] l2tpv3: fix fd leak

2014-11-17 Thread Markus Armbruster
Michael Tokarev writes: > 15.11.2014 13:06, arei.gong...@huawei.com wrote: >> From: Gonglei >> >> In this false branch, fd will leak when it is zero. >> Change the testing condition. > > Why fd==0 is a concern here? It is a very unlikely > situation that fd0 will be picked - firstly because >

Re: [Qemu-devel] [PATCH 1/9] l2tpv3: fix fd leak

2014-11-17 Thread Michael Tokarev
15.11.2014 13:06, arei.gong...@huawei.com wrote: > From: Gonglei > > In this false branch, fd will leak when it is zero. > Change the testing condition. Why fd==0 is a concern here? It is a very unlikely situation that fd0 will be picked - firstly because fd0 is almost always open, and second -

Re: [Qemu-devel] [PATCH 1/9] l2tpv3: fix fd leak

2014-11-17 Thread Stefan Hajnoczi
On Sat, Nov 15, 2014 at 06:06:40PM +0800, arei.gong...@huawei.com wrote: > From: Gonglei > > In this false branch, fd will leak when it is zero. > Change the testing condition. > > Signed-off-by: Gonglei > --- > net/l2tpv3.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by:

[Qemu-devel] [PATCH 1/9] l2tpv3: fix fd leak

2014-11-15 Thread arei.gonglei
From: Gonglei In this false branch, fd will leak when it is zero. Change the testing condition. Signed-off-by: Gonglei --- net/l2tpv3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/l2tpv3.c b/net/l2tpv3.c index 528d95b..b2b0fc0 100644 --- a/net/l2tpv3.c +++ b/net/l2t