summaryrefslogtreecommitdiffstats
path: root/vnet
diff options
context:
space:
mode:
authorJohn Lo <loj@cisco.com>2016-08-30 00:10:09 -0400
committerFlorin Coras <florin.coras@gmail.com>2016-08-30 10:52:34 +0000
commitcb9f3d7120ca06ff18251f36923144196f8ac3bf (patch)
tree93541ea89232b4bda2c5455f36ceabf0191e11f5 /vnet
parentc00617b13ccda0cfbd9ea248342643f728b0087f (diff)
VPP-361: Memory leak on delete of VXLAN over IPv6 tunnel
The key for VXLAN over IPv6 tunnel is allocated on create and should be freed on delete. Change-Id: I11bdd9465030fed57cc4bbd28dbccdf952633b34 Signed-off-by: John Lo <loj@cisco.com>
Diffstat (limited to 'vnet')
-rw-r--r--vnet/vnet/vxlan/vxlan.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/vnet/vnet/vxlan/vxlan.c b/vnet/vnet/vxlan/vxlan.c
index 86d49248e62..e10c0a85403 100644
--- a/vnet/vnet/vxlan/vxlan.c
+++ b/vnet/vnet/vxlan/vxlan.c
@@ -360,7 +360,10 @@ int vnet_vxlan_add_del_tunnel
if (!a->is_ip6)
hash_unset (vxm->vxlan4_tunnel_by_key, key4.as_u64);
else
- hash_unset_mem (vxm->vxlan6_tunnel_by_key, t->key6);
+ {
+ hash_unset_mem (vxm->vxlan6_tunnel_by_key, t->key6);
+ clib_mem_free (t->key6);
+ }
vec_free (t->rewrite);
pool_put (vxm->tunnels, t);