diff options
author | Bruno Haible <bruno@clisp.org> | 2007-10-13 15:57:07 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2009-06-23 12:15:16 +0200 |
commit | fb73d2ccf88c9b1f10c527ccb14a414479371d5f (patch) | |
tree | b5b2e41d30b915d3da70574bddc019fa43d3ab22 /gettext-runtime | |
parent | b2bf361d603f22941d9686693d2adbda4c0503ab (diff) | |
download | external_gettext-fb73d2ccf88c9b1f10c527ccb14a414479371d5f.zip external_gettext-fb73d2ccf88c9b1f10c527ccb14a414479371d5f.tar.gz external_gettext-fb73d2ccf88c9b1f10c527ccb14a414479371d5f.tar.bz2 |
From glibc: 2007-08-03 Jakub Jelinek <jakub@redhat.com>
Diffstat (limited to 'gettext-runtime')
-rw-r--r-- | gettext-runtime/intl/ChangeLog | 5 | ||||
-rw-r--r-- | gettext-runtime/intl/dcigettext.c | 5 | ||||
-rw-r--r-- | gettext-runtime/intl/finddomain.c | 3 |
3 files changed, 11 insertions, 2 deletions
diff --git a/gettext-runtime/intl/ChangeLog b/gettext-runtime/intl/ChangeLog index ec238ef..88ac1ac 100644 --- a/gettext-runtime/intl/ChangeLog +++ b/gettext-runtime/intl/ChangeLog @@ -1,3 +1,8 @@ +2007-08-03 Jakub Jelinek <jakub@redhat.com> + + * dcigettext.c (_nl_find_msg): Free encoding if __gconv_open failed. + * finddomain.c (_nl_find_domain): Free normalized_codeset on failure. + 2007-07-26 Jakub Jelinek <jakub@redhat.com> * gettextP.h (struct loaded_domain): Change plural to const diff --git a/gettext-runtime/intl/dcigettext.c b/gettext-runtime/intl/dcigettext.c index f81b5dc..289aab3 100644 --- a/gettext-runtime/intl/dcigettext.c +++ b/gettext-runtime/intl/dcigettext.c @@ -1109,7 +1109,10 @@ _nl_find_msg (struct loaded_l10nfile *domain_file, nothing to do. Otherwise do not use the translation at all. */ if (__builtin_expect (r != __GCONV_NULCONV, 1)) - return NULL; + { + free ((char *) encoding); + return NULL; + } convd->conv = (__gconv_t) -1; } diff --git a/gettext-runtime/intl/finddomain.c b/gettext-runtime/intl/finddomain.c index 97d098b..cab2c99 100644 --- a/gettext-runtime/intl/finddomain.c +++ b/gettext-runtime/intl/finddomain.c @@ -162,7 +162,7 @@ _nl_find_domain (const char *dirname, char *locale, if (retval == NULL) /* This means we are out of core. */ - return NULL; + goto out; if (retval->decided <= 0) _nl_load_domain (retval, domainbinding); @@ -182,6 +182,7 @@ _nl_find_domain (const char *dirname, char *locale, if (alias_value != NULL) free (locale); +out: /* The space for normalized_codeset is dynamically allocated. Free it. */ if (mask & XPG_NORM_CODESET) free ((void *) normalized_codeset); |