[ovs-dev] [PATCH 1/4] ovs-brcompatd: Fix dangling reference in del_port().

Justin Pettit jpettit at nicira.com
Wed Feb 24 22:26:14 PST 2010


Looks good.

--Justin


On Feb 23, 2010, at 2:35 PM, Ben Pfaff wrote:

> Until now, del_port() was deleting Interface records without deleting the
> Port record that referred to them.  OVSDB rejected that because it would
> have caused a dangling reference from the Port to the Interfaces.  This
> commit fixes the problem.
> 
> Bug #2425.
> ---
> vswitchd/ovs-brcompatd.c |    2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/vswitchd/ovs-brcompatd.c b/vswitchd/ovs-brcompatd.c
> index faf1bee..d0568a4 100644
> --- a/vswitchd/ovs-brcompatd.c
> +++ b/vswitchd/ovs-brcompatd.c
> @@ -479,6 +479,8 @@ del_port(const struct ovsrec_bridge *br, const char *port_name)
>         }
>         ovsrec_bridge_set_ports(br, ports, n);
>         free(ports);
> +
> +        ovsrec_port_delete(port_rec);
>     }
> }
> 
> -- 
> 1.6.6.1
> 
> 
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev_openvswitch.org





More information about the dev mailing list