Assume ANSI C behaviour of free().
diff --git a/libcharset/lib/ChangeLog b/libcharset/lib/ChangeLog
index a2c3fe9..a2495ec 100644
--- a/libcharset/lib/ChangeLog
+++ b/libcharset/lib/ChangeLog
@@ -1,5 +1,12 @@
 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  Bruno Haible  <bruno@clisp.org>
+
 	* relocatable.h: Update from gnulib.
 	* relocatable.c: Likewise.
 
diff --git a/libcharset/lib/localcharset.c b/libcharset/lib/localcharset.c
index cbcdace..3aceb42 100644
--- a/libcharset/lib/localcharset.c
+++ b/libcharset/lib/localcharset.c
@@ -229,8 +229,7 @@
                         {
                           /* 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);