diff options
author | Ulrich Drepper <drepper@redhat.com> | 1999-06-12 11:50:01 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1999-06-12 11:50:01 +0000 |
commit | 3de2d75e9cff1c6731bdf8d0441c18967e9bdb1c (patch) | |
tree | 79c8389113867d3867acdbca456e5c29ca3d6d05 /locale/lc-time.c | |
parent | 58d33bb594d64a7f48b84c19fb79f4cea0de91cb (diff) | |
download | glibc-3de2d75e9cff1c6731bdf8d0441c18967e9bdb1c.tar.gz glibc-3de2d75e9cff1c6731bdf8d0441c18967e9bdb1c.tar.xz glibc-3de2d75e9cff1c6731bdf8d0441c18967e9bdb1c.zip |
Update.
1999-06-12 Ulrich Drepper <drepper@cygnus.com> * locale/lc-time.c: Add free_mem function to free if necessary statically allocated memory.
Diffstat (limited to 'locale/lc-time.c')
-rw-r--r-- | locale/lc-time.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/locale/lc-time.c b/locale/lc-time.c index 5090e6d905..a9344fcd33 100644 --- a/locale/lc-time.c +++ b/locale/lc-time.c @@ -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); |