diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c index 359d7ddf17c..5615a5b74ed 100644 --- a/sys/net/if_bridge.c +++ b/sys/net/if_bridge.c @@ -532,13 +532,13 @@ bridge_clone_create(struct if_clone *ifc, int unit, caddr_t params) int retry; sc = malloc(sizeof(*sc), M_DEVBUF, M_WAITOK|M_ZERO); - BRIDGE_LOCK_INIT(sc); ifp = sc->sc_ifp = if_alloc(IFT_ETHER); if (ifp == NULL) { free(sc, M_DEVBUF); return (ENOSPC); } + BRIDGE_LOCK_INIT(sc); sc->sc_brtmax = BRIDGE_RTABLE_MAX; sc->sc_brttimeout = BRIDGE_RTABLE_TIMEOUT;