From: Roland McGrath Date: Wed, 26 Apr 1995 20:06:15 +0000 (+0000) Subject: (_nl_free_locale): Do nothing if DATA is null. X-Git-Tag: cvs/make-3-73-2~2 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=8b575de1c633e46182e9b9c07fd613dd5666c416;p=glibc.git (_nl_free_locale): Do nothing if DATA is null. --- 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)