aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--locale/loadlocale.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/locale/loadlocale.c b/locale/loadlocale.c
index bc9102bf28..5073bd4be3 100644
--- a/locale/loadlocale.c
+++ b/locale/loadlocale.c
@@ -204,6 +204,9 @@ void
_nl_free_locale (struct locale_data *data)
{
int save = errno;
+ if (! data)
+ /* Ignore a null pointer, like free does. */
+ return;
if (__munmap ((caddr_t) data->filedata, data->filesize) < 0)
{
if (errno == ENOSYS)