diff options
author | glebius <glebius@FreeBSD.org> | 2011-04-18 09:12:27 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2011-04-18 09:12:27 +0000 |
commit | 6c78a88c3bb5f7c87b56f79915289532c9997f86 (patch) | |
tree | 93e5d9fb7956c5887fdf3d8f3617c0eca1887866 /sys/netgraph/ng_split.c | |
parent | 636bed78e5bc6ab20edda6b6d287c8fb8a71476f (diff) | |
download | FreeBSD-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_split.c')
-rw-r--r-- | sys/netgraph/ng_split.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/netgraph/ng_split.c b/sys/netgraph/ng_split.c index b4f2ee0..87a2cbc 100644 --- a/sys/netgraph/ng_split.c +++ b/sys/netgraph/ng_split.c @@ -85,9 +85,7 @@ ng_split_constructor(node_p node) priv_p priv; /* Allocate node */ - priv = malloc(sizeof(*priv), M_NETGRAPH, M_ZERO | M_NOWAIT); - if (priv == NULL) - return (ENOMEM); + priv = malloc(sizeof(*priv), M_NETGRAPH, M_ZERO | M_WAITOK); /* Link together node and private info */ NG_NODE_SET_PRIVATE(node, priv); |