fix use-after-free when an interface event is pending while the interface is being...
authorFelix Fietkau <nbd@openwrt.org>
Thu, 29 Mar 2012 13:07:01 +0000 (16:07 +0300)
committerFelix Fietkau <nbd@openwrt.org>
Thu, 29 Mar 2012 13:07:01 +0000 (16:07 +0300)
interface.c

index d7498968de6be4fcb4bbd08353f0df43ca640bcc..0aa5c5aa71d7ddf794d926c4d7f565639be54fd4 100644 (file)
@@ -242,6 +242,7 @@ interface_cleanup(struct interface *iface, bool reload)
        list_for_each_entry_safe(dep, tmp, &iface->users, list)
                interface_remove_user(dep);
 
+       interface_dequeue_event(iface);
        interface_ip_flush(&iface->config_ip);
        interface_flush_state(iface);
        interface_clear_errors(iface);