about summary refs log tree commit diff
path: root/locale/loadlocale.c
diff options
context:
space:
mode:
Diffstat (limited to 'locale/loadlocale.c')
-rw-r--r--locale/loadlocale.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/locale/loadlocale.c b/locale/loadlocale.c
index 15570c36d1..3ac161eb3a 100644
--- a/locale/loadlocale.c
+++ b/locale/loadlocale.c
@@ -221,3 +221,14 @@ _nl_load_locale (struct loaded_l10nfile *file, int category)
   __close (fd);
   file->data = newdata;
 }
+
+void
+_nl_unload_locale (struct locale_data *locale)
+{
+  if (locale->mmaped)
+    __munmap ((caddr_t) locale->filedata, locale->filesize);
+  else
+    free ((void *) locale->filedata);
+
+  free (locale);
+}