12300 Memory leak in rfs3_readdirplus()
Review Request #2515 — Created Feb. 12, 2020 and submitted
This fixes memory leak in rfs3_readdirplus().
Using the reproduction steps I confirmed that with the fix the leak is no longer there.
Looks good, but maybe put kmem_free() there it was originally, i.e. after DTRACE_NFSV3_5(op__readdirplus__done) ?
Also I would move there at the end "kmem_free(namlen, args->dircount)"
Logic is simple: Move all freeings at the end to protect against possible use-after-free now or later.
Status: Closed (submitted)
commit dfdcac05b5cbcf4d3441fd96be492cec26eb3d24 Author: Marcel Telka <email@example.com> AuthorDate: Tue Feb 11 06:45:10 2020 +0100 Commit: Dan McDonald <firstname.lastname@example.org> CommitDate: Wed Feb 12 10:53:04 2020 -0500 12300 Memory leak in rfs3_readdirplus() Reviewed by: Matthias Scheler <email@example.com> Reviewed by: Vitaliy Gusev <firstname.lastname@example.org> Approved by: Dan McDonald <email@example.com> :100644 100644 1368da2199 9a62cea6d7 M usr/src/uts/common/fs/nfs/nfs3_srv.c