From 1349219e013d540e2d57db905f0ec2ef2b2e8b7d Mon Sep 17 00:00:00 2001 From: Marijn van der Werf Date: Mon, 29 Aug 2016 19:37:47 +0200 Subject: [PATCH] revert free --- PaintTest/main.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/PaintTest/main.c b/PaintTest/main.c index c144af953a..1f7c060f77 100644 --- a/PaintTest/main.c +++ b/PaintTest/main.c @@ -328,7 +328,6 @@ static void printImageId(uint32 input, utf8string *out) { else if (palette == PALETTE_A0)paletteName = "PALETTE_A0"; else if (palette == PALETTE_A4)paletteName = "PALETTE_A4"; else { - allocated = true; paletteName = malloc(16); sprintf(paletteName, "0x%08X", palette); } @@ -340,10 +339,6 @@ static void printImageId(uint32 input, utf8string *out) { } else { sprintf(*out, "%s | %d", paletteName, image); } - - if (allocated) { - free(paletteName); - } } static void printFunctionCall(utf8string *out, function_call call) { @@ -411,7 +406,6 @@ static void printFunctionCallArray(utf8string *out, function_call calls[], uint8 utf8string callOut = malloc(128); printFunctionCall(&callOut, calls[i]); sprintf(*out + strlen(*out), "%s\n", callOut); - free(callOut); } } @@ -523,7 +517,6 @@ bool testTrackElement(uint8 rideType, uint8 trackType, utf8string *error) { sprintf(*error, "Call counts don't match (was %d, expected %d) [direction:%d trackSequence:%d]", newCallCount, oldCallCount, direction, trackSequence); sprintf(*error + strlen(*error), "\n%s", diff); - free(diff); return false; } @@ -563,7 +556,7 @@ void testRide(int rideType) { if (!success) { printf(" FAILED!\n %s", error); } - free(error); + printf(ANSI_COLOR_RESET "\n"); }