ovs-brcompatd: Fix dangling reference in del_port().
authorBen Pfaff <blp@nicira.com>
Tue, 23 Feb 2010 22:35:24 +0000 (14:35 -0800)
committerBen Pfaff <blp@nicira.com>
Thu, 25 Feb 2010 22:48:16 +0000 (14:48 -0800)
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

index faf1bee..d0568a4 100644 (file)
@@ -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);
     }
 }