aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2005-12-22 01:03:50 +0000
committerRoland McGrath <roland@gnu.org>2005-12-22 01:03:50 +0000
commitc6813ffea9f3d04c40b81573edc787b39d45ec27 (patch)
tree927c8c699099610993e5403f85f12cef6ed1176a
parent8002dfb87a125fe0866f6d7130e590744789af2f (diff)
downloadglibc-c6813ffea9f3d04c40b81573edc787b39d45ec27.zip
glibc-c6813ffea9f3d04c40b81573edc787b39d45ec27.tar.gz
glibc-c6813ffea9f3d04c40b81573edc787b39d45ec27.tar.bz2
[BZ #2066]
2005-12-21 Roland McGrath <roland@redhat.com> [BZ #2066] * intl/l10nflist.c (_nl_make_l10nflist): Free ABS_FILENAME when later malloc fails.
-rw-r--r--ChangeLog6
-rw-r--r--intl/l10nflist.c7
2 files changed, 11 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index a97417b..74d0f40 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-12-21 Roland McGrath <roland@redhat.com>
+
+ [BZ #2066]
+ * intl/l10nflist.c (_nl_make_l10nflist): Free ABS_FILENAME when later
+ malloc fails.
+
2005-12-21 Jakub Jelinek <jakub@redhat.com>
* sysdeps/powerpc/fpu/libm-test-ulps: Update for GCC 4.1 prerelease.
diff --git a/intl/l10nflist.c b/intl/l10nflist.c
index 7ffb4ab..2c06a91 100644
--- a/intl/l10nflist.c
+++ b/intl/l10nflist.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-2002, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
@@ -270,7 +270,10 @@ _nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len, mask, language,
* (1 << pop (mask))
* sizeof (struct loaded_l10nfile *)));
if (retval == NULL)
- return NULL;
+ {
+ free (abs_filename);
+ return NULL;
+ }
retval->filename = abs_filename;
/* If more than one directory is in the list this is a pseudo-entry