commit 6b763af48a7856b904eac588eb4984b4559e8efd
parent e93508dc7b827063f4c2fce7308b39eba0b8516d
Author: Paul Longtine <paul@nanner.co>
Date: Wed, 27 Jan 2021 18:36:26 -0500
Fix missing call to 'free'
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/tisc.c b/tisc.c
@@ -543,6 +543,7 @@ int main(int argc, char *argv[])
if (process(line_number, &address, w_buffer, label, opcodes, args) == 0)
{
printf("Process: Error on line #%i\n", line_number);
+ free(w_buffer);
goto CLOSEFILES;
}
}
@@ -550,6 +551,8 @@ int main(int argc, char *argv[])
// Output Logisim raw v2.0 format
output_file(outputf, w_buffer, full_size);
+
+ free(w_buffer);
}
CLOSEFILES: