netgraph/bridge: malloc without flags
During tests an assert was triggered and pointed to missing flags in the newlink function of ng_bridge(4). Reported by: markj Reviewed by: markj MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D30759
This commit is contained in:
parent
d38630f619
commit
4c3280e587
@ -395,9 +395,7 @@ ng_bridge_newhook(node_p node, hook_p hook, const char *name)
|
||||
if(NG_PEER_NODE(hook) == node)
|
||||
return (ELOOP);
|
||||
|
||||
link = malloc(sizeof(*link), M_NETGRAPH_BRIDGE, M_ZERO);
|
||||
if (link == NULL)
|
||||
return (ENOMEM);
|
||||
link = malloc(sizeof(*link), M_NETGRAPH_BRIDGE, M_WAITOK | M_ZERO);
|
||||
|
||||
link->stats.recvOctets = counter_u64_alloc(M_WAITOK);
|
||||
link->stats.recvPackets = counter_u64_alloc(M_WAITOK);
|
||||
|
Loading…
Reference in New Issue
Block a user