Update.
authorUlrich Drepper <drepper@redhat.com>
Sat, 12 Jun 1999 11:50:01 +0000 (11:50 +0000)
committerUlrich Drepper <drepper@redhat.com>
Sat, 12 Jun 1999 11:50:01 +0000 (11:50 +0000)
1999-06-12  Ulrich Drepper  <drepper@cygnus.com>

* locale/lc-time.c: Add free_mem function to free if necessary
statically allocated memory.

ChangeLog
locale/lc-time.c

index ce50cdd..cb8e4cd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+1999-06-12  Ulrich Drepper  <drepper@cygnus.com>
+
+       * locale/lc-time.c: Add free_mem function to free if necessary
+       statically allocated memory.
+
 1999-06-10  Jakub Jelinek   <jj@ultra.linux.cz>
 
        * sysdeps/libm-ieee754/s_truncl.c: Subtract exponent
index 5090e6d..a9344fc 100644 (file)
@@ -1,5 +1,5 @@
 /* Define current locale data for LC_TIME category.
-   Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1995, 1996, 1997, 1999 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -174,3 +174,16 @@ _nl_get_alt_digit (unsigned int number)
 
   return result;
 }
+
+
+/* Free all resources if necessary.  */
+static void __attribute__ ((unused))
+free_mem (void)
+{
+  if (eras != NULL)
+    free (eras);
+  if (alt_digits != NULL)
+    free (alt_digits);
+}
+
+text_set_element (__libc_subfreeres, free_mem);