Skip to content

Commit

Permalink
Assume ANSI C behaviour of free().
Browse files Browse the repository at this point in the history
  • Loading branch information
bhaible committed Feb 28, 2011
1 parent ccc9de4 commit 5124ded
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 7 additions & 0 deletions libcharset/lib/ChangeLog
@@ -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 Bruno Haible <bruno@clisp.org>

* relocatable.h: Update from gnulib.
Expand Down
3 changes: 1 addition & 2 deletions libcharset/lib/localcharset.c
Expand Up @@ -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);
Expand Down

0 comments on commit 5124ded

Please sign in to comment.