Files
nsjail/net.cc
Sharad Boni 831ddd215b net: remove redundant nl_cache_free calls to fix double-free in initParent
initParent registers a defer{nl_cache_free(link_cache)} RAII guard that
runs on all exit paths, but the error returns inside the iface_own loop
and the cloneIface block also called nl_cache_free explicitly, causing
a double-free when moveToNs or cloneIface fails.

Remove the redundant explicit frees; the defer guard is sufficient.
2026-04-27 15:26:17 -07:00

24 KiB