Re: [Qemu-devel] [PATCH v2] tap: fix possible fd leak in net_init_tap

2014-11-01 Thread Gonglei
On 2014/11/2 13:39, Michael Tokarev wrote: > 02.11.2014 08:37, arei.gong...@huawei.com wrote: >> >> In hotplugging scenario, taking those true branch, the file >> handler do not be closed. Let's close them before return. > > This looks much better now, and is shorter too :) > Applied to -trivial,

Re: [Qemu-devel] [PATCH v2] tap: fix possible fd leak in net_init_tap

2014-11-01 Thread Michael Tokarev
02.11.2014 08:37, arei.gong...@huawei.com wrote: > > In hotplugging scenario, taking those true branch, the file > handler do not be closed. Let's close them before return. This looks much better now, and is shorter too :) Applied to -trivial, thank you! /mjt

[Qemu-devel] [PATCH v2] tap: fix possible fd leak in net_init_tap

2014-11-01 Thread arei.gonglei
From: Gonglei In hotplugging scenario, taking those true branch, the file handler do not be closed. Let's close them before return. Signed-off-by: Gonglei --- v1: [PATCH 2/2] tap: fix possible fd leak v2: add explicit close(fd) and change subject. (Thanks to /mjt) --- net/tap.c | 3 +++ 1 fi