aboutsummaryrefslogtreecommitdiffstats
path: root/man3
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2020-04-23 14:49:29 +0200
committerMichael Kerrisk <mtk.manpages@gmail.com>2020-04-23 14:49:29 +0200
commit0345d654d34e48c4c2062b0dee58b621627a1734 (patch)
tree9cecb756ce62d45c682608854453901a995e1e43 /man3
parent3daa240eae5b91c2949f42d58f2197ad6369dbd9 (diff)
downloadman-pages-0345d654d34e48c4c2062b0dee58b621627a1734.tar.gz
newlocale.3: Fix a valgrind issue in example program
See https://bugzilla.kernel.org/show_bug.cgi?id=202977. Reported-by: Piotr Caban <piotr@codeweavers.com> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Diffstat (limited to 'man3')
-rw-r--r--man3/newlocale.31
1 files changed, 1 insertions, 0 deletions
diff --git a/man3/newlocale.3 b/man3/newlocale.3
index a999c04c76..ea9b11d653 100644
--- a/man3/newlocale.3
+++ b/man3/newlocale.3
@@ -366,6 +366,7 @@ main(int argc, char *argv[])
/* Free the locale object */
+ uselocale(LC_GLOBAL_HANDLE); /* So 'loc' is no longer in use */
freelocale(loc);
exit(EXIT_SUCCESS);