tap: fix possible fd leak in net_init_tap
commit84f8f3dace8c6e88b1afa828f9abe1e9a57fac1a
authorGonglei <arei.gonglei@huawei.com>
Sun, 2 Nov 2014 05:37:17 +0000 (2 13:37 +0800)
committerMichael Tokarev <mjt@tls.msk.ru>
Sun, 2 Nov 2014 07:05:35 +0000 (2 10:05 +0300)
treea0c81e5c098c38ab06b882128f3154e6b1ce4711
parentd0caa3eb539de01043354440ce0a10b1f546cf06
tap: fix possible fd leak in net_init_tap

In hotplugging scenario, taking those true branch, the file
handler do not be closed. Let's close them before return.

Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
net/tap.c