ofproto: Fix write-after-free error in compose_nx_flow_removed().
[openvswitch] / vswitchd / bridge.c
index 18e4ef2401ca8b397dc8fad7dfc37dbbe7ef0072..f739505e3ec06c3b2be31e560511805754f10f53 100644 (file)
@@ -317,6 +317,17 @@ bridge_init(const char *remote)
     bond_init();
 }
 
+void
+bridge_exit(void)
+{
+    struct bridge *br, *next_br;
+
+    LIST_FOR_EACH_SAFE (br, next_br, node, &all_bridges) {
+        bridge_destroy(br);
+    }
+    ovsdb_idl_destroy(idl);
+}
+
 /* Performs configuration that is only necessary once at ovs-vswitchd startup,
  * but for which the ovs-vswitchd configuration 'cfg' is required. */
 static void