Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
tap_v2: fix issues reported by coverity
[vpp.git]
/
src
/
vnet
/
devices
/
tap
/
tap.c
diff --git
a/src/vnet/devices/tap/tap.c
b/src/vnet/devices/tap/tap.c
index
f31548c
..
4f76321
100644
(file)
--- 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;
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;
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);
done:
if (vhost_mem)
clib_mem_free (vhost_mem);
- if (fd != -1)
- close (fd);
+ if (
old_netns_
fd != -1)
+ close (
old_netns_
fd);
}
int
}
int