]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Fix memory leak (merge from glibc).
authorBruno Haible <bruno@clisp.org>
Thu, 18 May 2006 16:51:34 +0000 (16:51 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:13:21 +0000 (12:13 +0200)
gettext-runtime/intl/ChangeLog
gettext-runtime/intl/l10nflist.c

index 72c4d3d5c6ece4ee9e2345656be9f59d9363c530..1d6d4405d41c4bd856e7ea72387c12008129bdc6 100644 (file)
@@ -1,3 +1,8 @@
+2005-12-21  Roland McGrath  <roland@redhat.com>
+
+       * l10nflist.c (_nl_make_l10nflist): Free ABS_FILENAME when later malloc
+       fails.
+
 2006-05-17  Bruno Haible  <bruno@clisp.org>
 
        Cygwin portability.
index 1baaa792da7cdc54e9f1e9021bd42b1532bd8907..adcaa7f84a23b21c9d9167a9682f922b14576d51 100644 (file)
@@ -273,7 +273,10 @@ _nl_make_l10nflist (struct loaded_l10nfile **l10nfile_list,
            + (((dirlist_count << pop (mask)) + (dirlist_count > 1 ? 1 : 0))
               * sizeof (struct loaded_l10nfile *)));
   if (retval == NULL)
-    return NULL;
+    {
+      free (abs_filename);
+      return NULL;
+    }
 
   retval->filename = abs_filename;