From 55e2d5c7c4f5fdc23c8d0b2bf057c1559f862eec Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 31 Aug 2000 21:05:59 +0000 Subject: 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. --- intl/dcigettext.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'intl/dcigettext.c') diff --git a/intl/dcigettext.c b/intl/dcigettext.c index da6d88a..e431e42 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) { -- cgit v1.1