]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Assume ANSI C behaviour of free().
authorBruno Haible <bruno@clisp.org>
Mon, 28 Feb 2011 22:45:09 +0000 (23:45 +0100)
committerBruno Haible <bruno@clisp.org>
Tue, 7 Jun 2011 21:39:48 +0000 (23:39 +0200)
gettext-runtime/intl/ChangeLog
gettext-runtime/intl/localcharset.c

index dc06757b6e0c4c4377a22c0c263706e1d68e66b6..13a8bf96e2ea6f7e2e0a50e86e4f1d6c872813f9 100644 (file)
@@ -1,3 +1,10 @@
+2011-02-28  Bruno Haible  <bruno@clisp.org>
+
+       Assume ANSI C behaviour of free().
+       * localcharset.c (get_charset_aliases): Remove NULL test before calling
+       free().
+       Suggested by Simon Josefsson <simon@josefsson.org>.
+
 2011-02-28  Corinna Vinschen  <vinschen@redhat.com>  (tiny change)
             Charles Wilson  <cygwin@cwilson.fastmail.fm>  (tiny change)
             Bruno Haible  <bruno@clisp.org>  (tiny change)
index cbcdaceb69aa55959041f2d8e5f41f020d9c4394..3aceb422fb208eb796cb358f509b59266ba81dc7 100644 (file)
@@ -229,8 +229,7 @@ get_charset_aliases (void)
                         {
                           /* Out of memory. */
                           res_size = 0;
-                          if (old_res_ptr != NULL)
-                            free (old_res_ptr);
+                          free (old_res_ptr);
                           break;
                         }
                       strcpy (res_ptr + res_size - (l2 + 1) - (l1 + 1), buf1);