From: Felix Fietkau Date: Mon, 3 Oct 2011 00:49:59 +0000 (+0200) Subject: on interface free, remove the main_dev user if still present X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=9c0553eebbd86a78e098a2928b178effa31104e1;p=oweals%2Fnetifd.git on interface free, remove the main_dev user if still present --- diff --git a/interface.c b/interface.c index 435b485..e67c695 100644 --- a/interface.c +++ b/interface.c @@ -169,6 +169,8 @@ interface_set_available(struct interface *iface, bool new_state) static void interface_do_free(struct interface *iface) { + if (iface->main_dev.dev) + device_remove_user(&iface->main_dev); interface_set_proto_state(iface, NULL); free(iface->config); netifd_ubus_remove_interface(iface);