When a tunnel possibly needs to be updated, we are currently allocating
a new name for it. This is not necessary and in fact nothing uses the
name, which then results in the memory being leaked.

Fixes: 1d45d5a9 ("ovn-controller: Change encaps_run to work incrementally.")
Signed-off-by: Jesse Gross <je...@kernel.org>
---
 ovn/controller/encaps.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/ovn/controller/encaps.c b/ovn/controller/encaps.c
index 3bb8ae4..6623f19 100644
--- a/ovn/controller/encaps.c
+++ b/ovn/controller/encaps.c
@@ -309,12 +309,7 @@ check_and_update_tunnel(const struct sbrec_chassis 
*chassis_rec)
         const struct sbrec_encap *encap = preferred_encap(chassis_rec);
         const struct ovsrec_port *port = port_node->port;
         const struct ovsrec_interface *iface = port->interfaces[0];
-        char *port_name = tunnel_create_name(chassis_rec->name);
-        if (!port_name) {
-            VLOG_WARN("Unable to allocate unique name for '%s' tunnel",
-                      chassis_rec->name);
-            return;
-        }
+
         if (strcmp(encap->type, iface->type)) {
             ovsrec_interface_set_type(iface, encap->type);
         }
-- 
2.7.4

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to