HomeFreeBSD

if_ovpn: fix memory leak on unload

Description

if_ovpn: fix memory leak on unload

When we're unloading the if_ovpn module we sometimes end up only freeing
the softc after the module is unloaded and the M_OVPN malloc type no
longer exists.

Don't return from ovpn_clone_destroy() until the epoch callbacks have
been called, which ensures that we've freed the softc before we destroy
M_OVPN.

Sponsored by: Rubicon Communications, LLC ("Netgate")

Details

Provenance
kpAuthored on Sep 21 2022, 3:23 PM
Parents
rG9dfbbc919fd7: if_ovpn: remove incorrect rounding up of packet sizes
Branches
Unknown
Tags
Unknown