From: Bruno Haible Date: Mon, 28 Feb 2011 22:45:09 +0000 (+0100) Subject: Assume ANSI C behaviour of free(). X-Git-Tag: v0.18.2~88 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9d0f48c05060abcf150711a4c29ed1d87f0c165c;p=thirdparty%2Fgettext.git Assume ANSI C behaviour of free(). --- diff --git a/gettext-runtime/intl/ChangeLog b/gettext-runtime/intl/ChangeLog index dc06757b6..13a8bf96e 100644 --- a/gettext-runtime/intl/ChangeLog +++ b/gettext-runtime/intl/ChangeLog @@ -1,3 +1,10 @@ +2011-02-28 Bruno Haible + + Assume ANSI C behaviour of free(). + * localcharset.c (get_charset_aliases): Remove NULL test before calling + free(). + Suggested by Simon Josefsson . + 2011-02-28 Corinna Vinschen (tiny change) Charles Wilson (tiny change) Bruno Haible (tiny change) diff --git a/gettext-runtime/intl/localcharset.c b/gettext-runtime/intl/localcharset.c index cbcdaceb6..3aceb422f 100644 --- a/gettext-runtime/intl/localcharset.c +++ b/gettext-runtime/intl/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);