aboutsummaryrefslogtreecommitdiff
path: root/src/lexer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lexer.c')
-rw-r--r--src/lexer.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lexer.c b/src/lexer.c
index b2f9894..553a794 100644
--- a/src/lexer.c
+++ b/src/lexer.c
@@ -3,7 +3,7 @@
#include <ctype.h>
#include <stdio.h>
-#include "include/log.h"
+#include "include/util.h"
#include "include/lexer.h"
@@ -193,6 +193,7 @@ token_t* lexer_collect(lexer_t* lexer, char end_char, int fskip, int lskip, int
memcpy(token + len, current, strlen(current) * sizeof(char));
len += strlen(current) * sizeof(char);
+ free(current);
lexer_next(lexer);
}
@@ -213,6 +214,7 @@ token_t* lexer_get_keyword(lexer_t* lexer) {
);
strcat(keyword_so_far, current);
+ free(current);
lexer_next(lexer);
}