HomeFreeBSD

nfsd: Fix slow leaks of NAMEI buffers

Description

nfsd: Fix slow leaks of NAMEI buffers

Commit 5b5b7e2ca2fa changed namei()s behaviour such that it
does not free the NAMEI buffer unless returning an error.

The nfsd was not fixed for this. Fortunately, the only
leak would be one NAMEI buffer each time mountd(8) reloads
the exports. (There were also leaks in the pNFS server
configuration, but almost no one uses it.)

This patch fixes the leaks by adding NDFREE_PNBUF() macros
in the appropriate places.

MFC after: 2 weeks
Discussed with: kib
Fixes: 5b5b7e2ca2fa ("vfs: always retain path buffer after lookup")

Details

Provenance
rmacklemAuthored on Aug 15 2025, 7:11 PM
Parents
rG06410c1b5163: mandoc: Vendor import of upstream at 2025-07-27
Branches
Unknown
Tags
Unknown