The branch stable/12 has been updated by donner: URL: https://cgit.FreeBSD.org/src/commit/?id=63312dd6d12992d7e8c10bcd41389d5a25192f8f
commit 63312dd6d12992d7e8c10bcd41389d5a25192f8f Author: Lutz Donnerhacke <[email protected]> AuthorDate: 2021-06-13 22:00:35 +0000 Commit: Lutz Donnerhacke <[email protected]> CommitDate: 2021-06-16 21:58:59 +0000 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 Differential Revision: https://reviews.freebsd.org/D30759 (cherry picked from commit 4c3280e58727e900d4c217054fe655e3512380f1) --- sys/netgraph/ng_bridge.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/netgraph/ng_bridge.c b/sys/netgraph/ng_bridge.c index 5a8c1731aa3f..1a0840341020 100644 --- a/sys/netgraph/ng_bridge.c +++ b/sys/netgraph/ng_bridge.c @@ -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); _______________________________________________ [email protected] mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all To unsubscribe, send any mail to "[email protected]"
