mxge: free softc sysctl_ctx
authorAggelos Economopoulos <aoiko@cc.ece.ntua.gr>
Thu, 9 Jul 2009 13:23:11 +0000 (16:23 +0300)
committerAggelos Economopoulos <aoiko@cc.ece.ntua.gr>
Thu, 9 Jul 2009 13:23:11 +0000 (16:23 +0300)
sys/dev/netif/mxge/if_mxge.c

index d8ffce9..9cf5204 100644 (file)
@@ -1429,6 +1429,10 @@ mxge_rem_sysctls(mxge_softc_t *sc)
        struct mxge_slice_state *ss;
        int slice;
 
+       if (sc->sysctl_tree != NULL) {
+               sysctl_ctx_free(&sc->sysctl_ctx);
+               sc->sysctl_tree = NULL;
+       }
        if (sc->slice_sysctl_tree == NULL)
                return;