From: Taylor R Campbell Date: Sat, 13 Feb 2010 18:16:52 +0000 (-0500) Subject: Fix thinko in last change to check realloc errors in tparam.c. X-Git-Tag: 20100708-Gtk~171 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=dfed91cc3e71383e14f1668ef18e4788e2ed86bd;p=mit-scheme.git Fix thinko in last change to check realloc errors in tparam.c. --- diff --git a/src/microcode/tparam.c b/src/microcode/tparam.c index e8d365cef..6305d8271 100644 --- a/src/microcode/tparam.c +++ b/src/microcode/tparam.c @@ -201,15 +201,13 @@ tparam1 (char *string, char *outstring, int len, char *up, char *left, } else { - char *renew; outend += outlen; - renew = (char *) realloc (outstring, outlen *= 2); - if (renew == 0) + new = (char *) realloc (outstring, outlen *= 2); + if (new == 0) { - free (new); + free (outstring); return (0); } - new = renew; } op += new - outstring; outend += new - outstring;