From 9c0553eebbd86a78e098a2928b178effa31104e1 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 3 Oct 2011 02:49:59 +0200 Subject: [PATCH] on interface free, remove the main_dev user if still present --- interface.c | 2 ++ 1 file changed, 2 insertions(+) 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); -- 2.25.1