bridge: fix stray semicolon, fixes a bug in bridge primary port reset
[project/netifd.git] / config.c
index f589a4b..49bae15 100644 (file)
--- a/config.c
+++ b/config.c
@@ -71,12 +71,11 @@ config_parse_interface(struct uci_section *s, bool alias)
        }
 
        uci_to_blob(&b, s, &interface_attr_list);
-       iface = calloc(1, sizeof(*iface));
+
+       iface = interface_alloc(s->e.name, b.head);
        if (!iface)
                return;
 
-       interface_init(iface, s->e.name, b.head, false);
-
        if (iface->proto_handler && iface->proto_handler->config_params)
                uci_to_blob(&b, s, iface->proto_handler->config_params);