Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
tapv2: deleting tap interface may leak buffers (VPP-1124)
[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
ff7bd91
..
a7d10fe
100644
(file)
--- a/
src/vnet/devices/tap/tap.c
+++ b/
src/vnet/devices/tap/tap.c
@@
-390,7
+390,7
@@
error:
close (vif->tap_fd);
if (vif->fd != -1)
close (vif->fd);
close (vif->tap_fd);
if (vif->fd != -1)
close (vif->fd);
- vec_foreach_index (i, vif->vrings) virtio_vring_free (vif, i);
+ vec_foreach_index (i, vif->vrings) virtio_vring_free (v
m, v
if, i);
memset (vif, 0, sizeof (virtio_if_t));
pool_put (vim->interfaces, vif);
memset (vif, 0, sizeof (virtio_if_t));
pool_put (vim->interfaces, vif);
@@
-429,7
+429,7
@@
tap_delete_if (vlib_main_t * vm, u32 sw_if_index)
if (vif->fd != -1)
close (vif->fd);
if (vif->fd != -1)
close (vif->fd);
- vec_foreach_index (i, vif->vrings) virtio_vring_free (vif, i);
+ vec_foreach_index (i, vif->vrings) virtio_vring_free (v
m, v
if, i);
vec_free (vif->vrings);
hash_unset (tm->dev_instance_by_interface_id, vif->id);
vec_free (vif->vrings);
hash_unset (tm->dev_instance_by_interface_id, vif->id);