diff options
Diffstat (limited to 'sys/netgraph/ng_tag.c')
-rw-r--r-- | sys/netgraph/ng_tag.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/sys/netgraph/ng_tag.c b/sys/netgraph/ng_tag.c index 3fd908a..b183285 100644 --- a/sys/netgraph/ng_tag.c +++ b/sys/netgraph/ng_tag.c @@ -303,7 +303,7 @@ ng_tag_newhook(node_p node, hook_p hook, const char *name) int error; /* Create hook private structure. */ - MALLOC(hip, hinfo_p, sizeof(*hip), M_NETGRAPH_TAG, M_WAITOK | M_ZERO); + hip = malloc(sizeof(*hip), M_NETGRAPH_TAG, M_WAITOK | M_ZERO); /* M_WAITOK can't return NULL. */ NG_HOOK_SET_PRIVATE(hook, hip); @@ -316,13 +316,13 @@ ng_tag_newhook(node_p node, hook_p hook, const char *name) /* Attach the default IN data. */ if ((error = ng_tag_setdata_in(hook, &ng_tag_default_in)) != 0) { - FREE(hip, M_NETGRAPH_TAG); + free(hip, M_NETGRAPH_TAG); return (error); } /* Attach the default OUT data. */ if ((error = ng_tag_setdata_out(hook, &ng_tag_default_out)) != 0) { - FREE(hip, M_NETGRAPH_TAG); + free(hip, M_NETGRAPH_TAG); return (error); } @@ -621,9 +621,9 @@ ng_tag_disconnect(hook_p hook) priv->hi_nonmatch = NULL; } - FREE(hip->in, M_NETGRAPH_TAG); - FREE(hip->out, M_NETGRAPH_TAG); - FREE(hip, M_NETGRAPH_TAG); + free(hip->in, M_NETGRAPH_TAG); + free(hip->out, M_NETGRAPH_TAG); + free(hip, M_NETGRAPH_TAG); NG_HOOK_SET_PRIVATE(hook, NULL); /* for good measure */ if ((NG_NODE_NUMHOOKS(NG_HOOK_NODE(hook)) == 0) && (NG_NODE_IS_VALID(NG_HOOK_NODE(hook)))) { @@ -648,13 +648,13 @@ ng_tag_setdata_in(hook_p hook, const struct ng_tag_hookin *hp0) /* Make a copy of the tag values and data. */ size = NG_TAG_HOOKIN_SIZE(hp0->tag_len); - MALLOC(hp, struct ng_tag_hookin *, size, M_NETGRAPH_TAG, M_WAITOK); + hp = malloc(size, M_NETGRAPH_TAG, M_WAITOK); /* M_WAITOK can't return NULL. */ bcopy(hp0, hp, size); /* Free previous tag, if any, and assign new one. */ if (hip->in != NULL) - FREE(hip->in, M_NETGRAPH_TAG); + free(hip->in, M_NETGRAPH_TAG); hip->in = hp; /* @@ -698,13 +698,13 @@ ng_tag_setdata_out(hook_p hook, const struct ng_tag_hookout *hp0) /* Make a copy of the tag values and data. */ size = NG_TAG_HOOKOUT_SIZE(hp0->tag_len); - MALLOC(hp, struct ng_tag_hookout *, size, M_NETGRAPH_TAG, M_WAITOK); + hp = malloc(size, M_NETGRAPH_TAG, M_WAITOK); /* M_WAITOK can't return NULL. */ bcopy(hp0, hp, size); /* Free previous tag, if any, and assign new one. */ if (hip->out != NULL) - FREE(hip->out, M_NETGRAPH_TAG); + free(hip->out, M_NETGRAPH_TAG); hip->out = hp; /* Fill internal values from API structures. */ |