summaryrefslogtreecommitdiff
path: root/make.c
diff options
context:
space:
mode:
Diffstat (limited to 'make.c')
-rw-r--r--make.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/make.c b/make.c
index 683410f..919cac8 100644
--- a/make.c
+++ b/make.c
@@ -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)