kernel/netgraph7: Replace usage of MALLOC/FREE with kmalloc/kfree here too.
[dragonfly.git] / sys / netgraph7 / ng_one2many.c
index f4923e6..7b692b1 100644 (file)
@@ -188,7 +188,8 @@ ng_one2many_constructor(node_p node)
        priv_p priv;
 
        /* Allocate and initialize private info */
-       MALLOC(priv, priv_p, sizeof(*priv), M_NETGRAPH, M_WAITOK | M_NULLOK | M_ZERO);
+       priv = kmalloc(sizeof(*priv), M_NETGRAPH,
+                      M_WAITOK | M_NULLOK | M_ZERO);
        if (priv == NULL)
                return (ENOMEM);
        priv->conf.xmitAlg = NG_ONE2MANY_XMIT_ROUNDROBIN;
@@ -502,7 +503,7 @@ ng_one2many_shutdown(node_p node)
 
        KASSERT(priv->numActiveMany == 0,
            ("%s: numActiveMany=%d", __func__, priv->numActiveMany));
-       FREE(priv, M_NETGRAPH);
+       kfree(priv, M_NETGRAPH);
        NG_NODE_SET_PRIVATE(node, NULL);
        NG_NODE_UNREF(node);
        return (0);