From a1fabe91eb33ef17030c588dfbdfd9d781a7ea63 Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Tue, 14 Jan 2020 11:53:31 -0500 Subject: clean up memory leak --- make.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/make.c b/make.c index 683410f..919cac8 100644 --- a/make.c +++ b/make.c @@ -2,6 +2,7 @@ #include #include #include +#include #include "maje.h" @@ -32,6 +33,8 @@ static void addfile(FILE *makefile, const char *src, const char *target) fprintf(makefile, "%s: %s\n", target, obj); fprintf(makefile, "%s: %s\n", obj, src); fprintf(makefile, "\t$(CC) $(CFLAGS) -c %s\n\n", src); + + free(obj); } void make_makefile(const char *makepath, char **sources, const char *target) -- cgit v1.2.1