aboutsummaryrefslogtreecommitdiff
path: root/lib/libpam/Makefile
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2020-10-02 18:35:55 +0000
committerMark Johnston <markj@FreeBSD.org>2020-10-02 18:35:55 +0000
commitafd95785c0b15302b2dc1bc0adfc21d58d0f2367 (patch)
tree32c6df89833a360072a614fcf0fe43bc587e46f2 /lib/libpam/Makefile
parent1e145e73b8c939caf210c8992960c2d9d5a28d37 (diff)
newlocale(3): Fix a memory leak.
newlocale() optionally takes a "base" locale, from which components not specified in the mask are inherited. POSIX says that newlocale() may modify "base" and return it, or free "base" and return a newly allocated locale. We were not doing either, so applications which use newlocale() to modify an existing base locale end up leaking memory on FreeBSD. This diff fixes the leak by releasing a reference to the base locale before returning. This is less efficient than modifying "base" directly, but is simpler for an initial bug fix. Also, update the man page to clarify behaviour with respect to "base". PR: 249416 MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D26522
Notes
Notes: svn path=/head/; revision=366375
Diffstat (limited to 'lib/libpam/Makefile')
0 files changed, 0 insertions, 0 deletions