HomeFreeBSD

ng_socket: plug node reference leak

Description

ng_socket: plug node reference leak

There is no need to reference node in its constructor, the framework
already granted us a reference. This extraneous reference was later given
back on socket detach. However, if node is destroyed before the socket,
the node was leaked. This leak was harmless until VIMAGE, where
vnet_netgraph_uninit() would cycle through all nodes and shut them down
expecting them to not exist after the shutdown.

Fixes: 19284374970533e1aa04020d4f840e8877ed6266

Details

Provenance
glebiusAuthored on Jun 26 2026, 11:03 PM
Parents
rG41bc52c89320: ng_socket: simplify protosw(9) methods
Branches
Unknown
Tags
Unknown