Fix thinko in last change to check realloc errors in tparam.c.
authorTaylor R Campbell <campbell@mumble.net>
Sat, 13 Feb 2010 18:16:52 +0000 (13:16 -0500)
committerTaylor R Campbell <campbell@mumble.net>
Sat, 13 Feb 2010 18:16:52 +0000 (13:16 -0500)
src/microcode/tparam.c

index e8d365cefd7f4aad4ec0c7fc9a90ba97e2746a3c..6305d827125c0295024029b22be43dd6507eb3e3 100644 (file)
@@ -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;