summaryrefslogtreecommitdiff
path: root/sysdeps/generic
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2020-05-14 17:56:25 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2020-07-07 14:10:58 -0300
commit725eeb4af14c6fec4ed26a796cdfd6d50df86d42 (patch)
treed42f43a268e498d3ff8a891ef274747e4f2a0795 /sysdeps/generic
parent28aff047818eb1726394296d27b9c7885340bead (diff)
downloadglibc-725eeb4af14c6fec4ed26a796cdfd6d50df86d42.tar.gz
string: Use tls-internal on strerror_l
The buffer allocation uses the same strategy of strsignal. Checked on x86-64-linux-gnu, i686-linux-gnu, powerpc64le-linux-gnu, and s390x-linux-gnu. Tested-by: Carlos O'Donell <carlos@redhat.com> Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'sysdeps/generic')
-rw-r--r--sysdeps/generic/tls-internal-struct.h1
-rw-r--r--sysdeps/generic/tls-internal.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/sysdeps/generic/tls-internal-struct.h b/sysdeps/generic/tls-internal-struct.h
index 33a9079ee9..156e722bd8 100644
--- a/sysdeps/generic/tls-internal-struct.h
+++ b/sysdeps/generic/tls-internal-struct.h
@@ -22,6 +22,7 @@
struct tls_internal_t
{
char *strsignal_buf;
+ char *strerror_l_buf;
};
#endif
diff --git a/sysdeps/generic/tls-internal.h b/sysdeps/generic/tls-internal.h
index 1f6a117d76..b4b03b4ecf 100644
--- a/sysdeps/generic/tls-internal.h
+++ b/sysdeps/generic/tls-internal.h
@@ -34,6 +34,7 @@ static inline void
__glibc_tls_internal_free (void)
{
free (__tls_internal.strsignal_buf);
+ free (__tls_internal.strerror_l_buf);
}
#endif