diff options
author | Jakob Kaivo <jkk@ung.org> | 2020-01-14 11:53:31 -0500 |
---|---|---|
committer | Jakob Kaivo <jkk@ung.org> | 2020-01-14 11:53:31 -0500 |
commit | a1fabe91eb33ef17030c588dfbdfd9d781a7ea63 (patch) | |
tree | 6ce36a86f95d9a9709f34a08b8b61bb2ca0de4d9 | |
parent | ce7f2c194888d91e52e05cb8acff45032ca122ad (diff) |
clean up memory leak
-rw-r--r-- | make.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -2,6 +2,7 @@ #include <libgen.h> #include <string.h> #include <stdio.h> +#include <stdlib.h> #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) |