HomeFreeBSD

MFC r320216: Fix use-after-free introduced in r300388.

Description

MFC r320216: Fix use-after-free introduced in r300388.

In r300388, endnetconfig() was called on nc_handle which would release
the associated netconfig structure, which means tmpnconf->nc_netid
would be a use-after-free.

Solve this by doing endnetconfig() in return paths instead.

Reported by: jemalloc via kevlo
Reviewed by: cem, ngie (earlier version)
Approved by: re (kib)

Details

Provenance
delphijAuthored on
Reviewer
cem
Parents
rS320329: PFS_DELEN is the sum of the permanent part of the struct dirent and
Branches
Unknown
Tags
Unknown