aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOle Troan <ot@cisco.com>2017-01-10 10:07:04 +0100
committerDave Barach <openvpp@barachs.net>2017-01-10 12:49:53 +0000
commit553a41190963099631a73fb0a77b07b871d65e70 (patch)
tree195a436884d3a8be6715d5e3d20e51e44856fb00 /src
parentffc18f5ef789c525e43706d643ad853cd941f4dd (diff)
VPP-585: vhost-user interface deletion leaks memory.
Change-Id: I69bbc447e1989adea40f052eac4550036b6e2e1e Signed-off-by: Ole Troan <ot@cisco.com>
Diffstat (limited to 'src')
-rw-r--r--src/vnet/devices/virtio/vhost-user.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/vnet/devices/virtio/vhost-user.c b/src/vnet/devices/virtio/vhost-user.c
index 3fbcee90752..ee41ee1858b 100644
--- a/src/vnet/devices/virtio/vhost-user.c
+++ b/src/vnet/devices/virtio/vhost-user.c
@@ -2386,12 +2386,19 @@ VLIB_REGISTER_NODE (vhost_user_process_node,static) = {
static void
vhost_user_term_if (vhost_user_intf_t * vui)
{
+ int q;
+
// Delete configured thread pinning
vec_reset_length (vui->workers);
// disconnect interface sockets
vhost_user_if_disconnect (vui);
vhost_user_update_iface_state (vui);
+ for (q = 0; q < VHOST_VRING_MAX_N; q++)
+ {
+ clib_mem_free ((void *) vui->vring_locks[q]);
+ }
+
if (vui->unix_server_index != ~0)
{
//Close server socket