summaryrefslogtreecommitdiffstats
path: root/sys/netgraph/ng_etf.c
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2011-04-18 09:12:27 +0000
committerglebius <glebius@FreeBSD.org>2011-04-18 09:12:27 +0000
commit6c78a88c3bb5f7c87b56f79915289532c9997f86 (patch)
tree93e5d9fb7956c5887fdf3d8f3617c0eca1887866 /sys/netgraph/ng_etf.c
parent636bed78e5bc6ab20edda6b6d287c8fb8a71476f (diff)
downloadFreeBSD-src-6c78a88c3bb5f7c87b56f79915289532c9997f86.zip
FreeBSD-src-6c78a88c3bb5f7c87b56f79915289532c9997f86.tar.gz
Node constructor methods are supposed to be called in syscall
context always. Convert nodes to consistently use M_WAITOK flag for memory allocation. Reviewed by: julian
Diffstat (limited to 'sys/netgraph/ng_etf.c')
-rw-r--r--sys/netgraph/ng_etf.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/sys/netgraph/ng_etf.c b/sys/netgraph/ng_etf.c
index 7e607f7..2167b5d 100644
--- a/sys/netgraph/ng_etf.c
+++ b/sys/netgraph/ng_etf.c
@@ -180,10 +180,7 @@ ng_etf_constructor(node_p node)
int i;
/* Initialize private descriptor */
- privdata = malloc(sizeof(*privdata), M_NETGRAPH_ETF,
- M_NOWAIT | M_ZERO);
- if (privdata == NULL)
- return (ENOMEM);
+ privdata = malloc(sizeof(*privdata), M_NETGRAPH_ETF, M_WAITOK | M_ZERO);
for (i = 0; i < HASHSIZE; i++) {
LIST_INIT((privdata->hashtable + i));
}
OpenPOWER on IntegriCloud