From b5e4de3f823c581d3aa6b42b0286906781662c9d Mon Sep 17 00:00:00 2001 From: Chris Cromer Date: Sat, 19 Jun 2021 20:30:08 -0400 Subject: [PATCH] free up the line pointer after we are finished --- src/loop.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/loop.c b/src/loop.c index c16b63a..2f3697c 100644 --- a/src/loop.c +++ b/src/loop.c @@ -40,6 +40,7 @@ void loop() { if (feof(stdin)) { // the stdin was closed, this usually happens for CTRL-D printf("\n"); + free(line); break; } else { @@ -52,6 +53,7 @@ void loop() { remove_new_line(line); if (strcmp(line, "quit") == 0) { + free(line); break; } }