]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
From glibc: 2007-08-03 Jakub Jelinek <jakub@redhat.com>
authorBruno Haible <bruno@clisp.org>
Sat, 13 Oct 2007 15:57:07 +0000 (15:57 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:15:16 +0000 (12:15 +0200)
gettext-runtime/intl/ChangeLog
gettext-runtime/intl/dcigettext.c
gettext-runtime/intl/finddomain.c

index ec238efec8c9b43009aa72e8965da7892a63c4d4..88ac1ac9fce5751a5160d76ed43f45e381aacf67 100644 (file)
@@ -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
index f81b5dcd981a0ba95d1b1d67c710f3da15f5f47c..289aab3085b4f69333c707850c86bbe8de00b7e9 100644 (file)
@@ -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;
                      }
index 97d098b27fe54ead52819becf05913813b7295c5..cab2c99907b493580cfa743613242fa4963f74fd 100644 (file)
@@ -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);