about summary refs log tree commit diff
path: root/intl
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2007-08-03 15:50:30 +0000
committerUlrich Drepper <drepper@redhat.com>2007-08-03 15:50:30 +0000
commitce31a3b1c588f8b8a5c7702c6460d6bd4386bd95 (patch)
tree3b8f897b1e40b26d31f18e8095cfd9102612de71 /intl
parent96c502084aeb396c8794723b32bdcad58a634695 (diff)
downloadglibc-ce31a3b1c588f8b8a5c7702c6460d6bd4386bd95.tar.gz
glibc-ce31a3b1c588f8b8a5c7702c6460d6bd4386bd95.tar.xz
glibc-ce31a3b1c588f8b8a5c7702c6460d6bd4386bd95.zip
* intl/dcigettext.c (_nl_find_msg): Free encoding if __gconv_open
	failed.
	* intl/finddomain.c (_nl_find_domain): Free normalized_codeset
	on failure.

	* elf/dl-load.c (decompose_rpath): Free copy if result couldn't be
	allocated.

2007-08-03  Jakub Jelinek  <jakub@redhat.com>
Diffstat (limited to 'intl')
-rw-r--r--intl/dcigettext.c5
-rw-r--r--intl/finddomain.c3
2 files changed, 6 insertions, 2 deletions
diff --git a/intl/dcigettext.c b/intl/dcigettext.c
index 23e019ab32..ad2835f930 100644
--- a/intl/dcigettext.c
+++ b/intl/dcigettext.c
@@ -949,7 +949,10 @@ _nl_find_msg (domain_file, domainbinding, msgid, convert, lengthp)
 			   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/intl/finddomain.c b/intl/finddomain.c
index 54e617ca99..03583b12b7 100644
--- a/intl/finddomain.c
+++ b/intl/finddomain.c
@@ -143,7 +143,7 @@ _nl_find_domain (dirname, locale, domainname, domainbinding)
 
   if (retval == NULL)
     /* This means we are out of core.  */
-    return NULL;
+    goto out;
 
   if (retval->decided <= 0)
     _nl_load_domain (retval, domainbinding);
@@ -159,6 +159,7 @@ _nl_find_domain (dirname, locale, domainname, domainbinding)
 	}
     }
 
+out:
   /* The space for normalized_codeset is dynamically allocated.  Free it.  */
   if (mask & XPG_NORM_CODESET)
     free ((void *) normalized_codeset);