diff options
author | Shav Kinderlehrer <[email protected]> | 2023-05-01 18:07:53 -0400 |
---|---|---|
committer | Shav Kinderlehrer <[email protected]> | 2023-05-01 18:07:53 -0400 |
commit | d5c32592251039350fb290011df9cac3e5ea9e78 (patch) | |
tree | 85feb2968d39fe087e12255181f4ff0e85e11f74 /src/main.c | |
parent | 7e24ad39b1e926339cbe3ec295791d0f608a91df (diff) | |
download | lat-d5c32592251039350fb290011df9cac3e5ea9e78.tar.gz lat-d5c32592251039350fb290011df9cac3e5ea9e78.zip |
Fix memory leak and NULL-check error
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1,12 +1,11 @@ -#include <stdio.h> -#include <stdlib.h> -#include <unistd.h> - #include "arg.h" #include "file.h" #include "process.h" #include "types.h" #include "util.h" +#include <stdio.h> +#include <stdlib.h> +#include <unistd.h> #define INVERT_T "\x1b[7m" #define UINVERT_T "\x1b[27m" @@ -77,6 +76,7 @@ void run(FILE *fp, char *filename, bool tty) { fwrite("\n", 1, 1, err); } free(f.buf); + free(f.lines); fflush(st); // prevent timing inconsistencies between st and err fflush(err); |