Re: [ovs-dev] [PATCH rebase 1/3] ovn-controller: Fix memory leak when updating tunnels.

2016-08-11 Thread Ben Pfaff
On Thu, Aug 11, 2016 at 05:20:32PM -0700, Jesse Gross wrote:
> 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 

Weird.  Good catch.

Acked-by: Ben Pfaff 
___
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev


Re: [ovs-dev] [PATCH rebase 1/3] ovn-controller: Fix memory leak when updating tunnels.

2016-08-11 Thread Ryan Moats
"dev" <dev-boun...@openvswitch.org> wrote on 08/11/2016 07:20:32 PM:

> From: Jesse Gross <je...@kernel.org>
> To: dev@openvswitch.org
> Date: 08/11/2016 07:21 PM
> Subject: [ovs-dev] [PATCH rebase 1/3] ovn-controller: Fix memory
> leak when updating tunnels.
> Sent by: "dev" <dev-boun...@openvswitch.org>
>
> 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>
> ---

Good catch...

Acked-by: Ryan Moats <rmo...@us.ibm.com>
___
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev


[ovs-dev] [PATCH rebase 1/3] ovn-controller: Fix memory leak when updating tunnels.

2016-08-11 Thread Jesse Gross
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 
---
 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