aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/devices/tap/tap.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2017-12-09 21:19:01 +0100
committerFlorin Coras <florin.coras@gmail.com>2017-12-10 20:29:02 +0000
commit4e671d20c8bc6a45ff703625d78f6703c62094b7 (patch)
tree8635589b95da82aba3507f1a3d4d358377a8dfae /src/vnet/devices/tap/tap.c
parent32a9d7bf63015aeeb6dee4a2342933be58871176 (diff)
tap_v2: fix issues reported by coverity
Change-Id: I1bbd3f6ece255edfd4ebf268ac60f79dce1d10e7 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vnet/devices/tap/tap.c')
-rw-r--r--src/vnet/devices/tap/tap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/vnet/devices/tap/tap.c b/src/vnet/devices/tap/tap.c
index f31548cbbec..4f76321071c 100644
--- a/src/vnet/devices/tap/tap.c
+++ b/src/vnet/devices/tap/tap.c
@@ -84,7 +84,7 @@ tap_create_if (vlib_main_t * vm, tap_create_if_args_t * args)
tap_main_t *tm = &tap_main;
vnet_sw_interface_t *sw;
vnet_hw_interface_t *hw;
- int i, fd = -1;
+ int i;
int old_netns_fd = -1;
struct ifreq ifr;
size_t hdrsz;
@@ -385,8 +385,8 @@ error:
done:
if (vhost_mem)
clib_mem_free (vhost_mem);
- if (fd != -1)
- close (fd);
+ if (old_netns_fd != -1)
+ close (old_netns_fd);
}
int