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 faf1bee37cf7804d624abf1637aa46e372e48cd9..d0568a48d91445e75030d41907848b02eeff5a73 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);
     }
 }