aboutsummaryrefslogtreecommitdiff
path: root/intl/dcigettext.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-08-31 21:05:59 +0000
committerUlrich Drepper <drepper@redhat.com>2000-08-31 21:05:59 +0000
commit55e2d5c7c4f5fdc23c8d0b2bf057c1559f862eec (patch)
treeb6fd328b07e6f8a7a048b20748326283d9af45ec /intl/dcigettext.c
parent69071b2ab6e27435b9a2d610b1b5b8c48ea92940 (diff)
downloadglibc-55e2d5c7c4f5fdc23c8d0b2bf057c1559f862eec.tar
glibc-55e2d5c7c4f5fdc23c8d0b2bf057c1559f862eec.tar.gz
glibc-55e2d5c7c4f5fdc23c8d0b2bf057c1559f862eec.tar.bz2
glibc-55e2d5c7c4f5fdc23c8d0b2bf057c1559f862eec.zip
Update.
* intl/Makefile (tests): Depend in mtrace-tst-gettext. Make this a new rule depending on tst-gettext.out and run mtrace. * intl/tst-gettext.c: Call mtrace. * intl/tst-gettext.sh: Put MALLOC_TRACE in environment of tst-gettext. * elf/dl-reloc.c: Add a few more __builtin_expect. * configure.in: Remove --with-gettext option. * intl/dcigettext.c (free_mem): Correct freeing of _nl_domain_bindings list.
Diffstat (limited to 'intl/dcigettext.c')
-rw-r--r--intl/dcigettext.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/intl/dcigettext.c b/intl/dcigettext.c
index da6d88a492..e431e4260f 100644
--- a/intl/dcigettext.c
+++ b/intl/dcigettext.c
@@ -1129,16 +1129,17 @@ mempcpy (dest, src, n)
static void __attribute__ ((unused))
free_mem (void)
{
- struct binding *runp;
void *old;
- for (runp = _nl_domain_bindings; runp != NULL; runp = runp->next)
+ while (_nl_domain_bindings != NULL)
{
- if (runp->dirname != _nl_default_dirname)
+ struct binding *oldp = _nl_domain_bindings;
+ _nl_domain_bindings = _nl_domain_bindings->next;
+ if (oldp->dirname != _nl_default_dirname)
/* Yes, this is a pointer comparison. */
- free (runp->dirname);
- if (runp->codeset != NULL)
- free (runp->codeset);
+ free (oldp->dirname);
+ free (oldp->codeset);
+ free (oldp);
}
if (_nl_current_default_domain != _nl_default_default_domain)
@@ -1147,6 +1148,7 @@ free_mem (void)
/* Remove the search tree with the known translations. */
__tdestroy (root, free);
+ root = NULL;
while (transmem_list != NULL)
{