diff options
author | Gonglei <arei.gonglei@huawei.com> | 2014-10-31 14:11:00 +0800 |
---|---|---|
committer | Michael Tokarev <mjt@tls.msk.ru> | 2014-11-02 10:05:32 +0300 |
commit | d0caa3eb539de01043354440ce0a10b1f546cf06 (patch) | |
tree | ac94d61066bd5c3ddca6f080a2d2166377894262 /net/tap.c | |
parent | bb019cf911ee4a152e3b31940d702d7b8a8b8114 (diff) | |
download | qemu-d0caa3eb539de01043354440ce0a10b1f546cf06.zip qemu-d0caa3eb539de01043354440ce0a10b1f546cf06.tar.gz qemu-d0caa3eb539de01043354440ce0a10b1f546cf06.tar.bz2 |
tap: do not close(fd) in net_init_tap_one
commit 5193e5fb (tap: factor out common tap initialization)
introduce net_init_tap_one(). But it's inappropriate that
we close fd in net_init_tap_one(), we should lay it in the
caller, becuase some callers needn't to close it if we get
the fd by monitor_handle_fd_param().
On the other hand, in other exceptional branches fd isn't
closed, so that's incomplete anyway.
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'net/tap.c')
-rw-r--r-- | net/tap.c | 1 |
1 files changed, 0 insertions, 1 deletions
@@ -598,7 +598,6 @@ static int net_init_tap_one(const NetdevTapOptions *tap, NetClientState *peer, s = net_tap_fd_init(peer, model, name, fd, vnet_hdr); if (!s) { - close(fd); return -1; } |