diff options
author | Ryan Moeller <[email protected]> | 2022-01-14 15:38:32 -0500 |
---|---|---|
committer | Tony Hutter <[email protected]> | 2022-02-03 15:28:01 -0800 |
commit | f4def7ec6c9a003dd6c85a8a78531bf5eb5996e0 (patch) | |
tree | bf55b2e316c6bef9a7fa9237552629285e1aea49 /module | |
parent | c9c9d634aa6f4aeaf867b534a967f2dc73bfa25a (diff) |
FreeBSD: Fix leaked strings in libspl mnttab
The FreeBSD implementations of various libspl functions for getting
mounted device information were found to leak several strings which
were being allocated in statfs2mnttab but never freed.
The Solaris getmntany(3C) and related interfaces are expected to return
strings residing in static buffers that need to be copied rather than
freed by the caller.
Use static thread-local storage to stash the mnttab structure strings
from FreeBSD's statfs info rather than strings allocated on the heap by
strdup(3).
While here, remove some stray commented out lines.
Reviewed-by: Alexander Motin <[email protected]>
Reviewed-by: Rich Ercolani <[email protected]>
Signed-off-by: Ryan Moeller <[email protected]>
Closes #12961
Diffstat (limited to 'module')
0 files changed, 0 insertions, 0 deletions