Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Assume ANSI C behaviour of free().

  • Loading branch information...
commit 5124dedfeb6c6f138c2d08d1d3abdc2eda240e0e 1 parent ccc9de4
@bhaible bhaible authored
Showing with 8 additions and 2 deletions.
  1. +7 −0 libcharset/lib/ChangeLog
  2. +1 −2  libcharset/lib/localcharset.c
View
7 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.
View
3  libcharset/lib/localcharset.c
@@ -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);
Please sign in to comment.
Something went wrong with that request. Please try again.