vswitchd: Fix segmentation fault with bonded ports.
authorEthan Jackson <ethan@nicira.com>
Fri, 7 Jan 2011 00:17:23 +0000 (16:17 -0800)
committerEthan Jackson <ethan@nicira.com>
Fri, 7 Jan 2011 20:43:43 +0000 (12:43 -0800)
This commit fixes a segmentation fault which could occur when a
bonded port was destroyed.

vswitchd/bridge.c

index e2d26c00968cab8a570b53c210584823997a9860..f7890e95eb06308ac6d896e107d8e4091d7171e7 100644 (file)
@@ -3984,6 +3984,10 @@ iface_destroy(struct iface *iface)
         bool del_active = port->active_iface == iface->port_ifidx;
         struct iface *del;
 
+        if (port->monitor) {
+            netdev_monitor_remove(port->monitor, iface->netdev);
+        }
+
         shash_find_and_delete_assert(&br->iface_by_name, iface->name);
 
         if (iface->dp_ifidx >= 0) {