diff options
Diffstat (limited to 'src/bootstrap/main.c')
-rwxr-xr-x | src/bootstrap/main.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/bootstrap/main.c b/src/bootstrap/main.c index cfad9f1..22332af 100755 --- a/src/bootstrap/main.c +++ b/src/bootstrap/main.c | |||
@@ -6,6 +6,8 @@ | |||
6 | #include <stdlib.h> | 6 | #include <stdlib.h> |
7 | #include <string.h> | 7 | #include <string.h> |
8 | 8 | ||
9 | #include "darray.h" | ||
10 | |||
9 | #include "singletons.c" | 11 | #include "singletons.c" |
10 | 12 | ||
11 | #include "environment.c" | 13 | #include "environment.c" |
@@ -92,10 +94,10 @@ init(void) { | |||
92 | 94 | ||
93 | void | 95 | void |
94 | process_source(const StringView *source) { | 96 | process_source(const StringView *source) { |
95 | Tokens tokens = tokenize(source); | 97 | Token *tokens = tokenize(source); |
96 | if (errors_n != 0) { | 98 | if (errors_n != 0) { |
97 | if (tokens.buf != NULL) { | 99 | if (tokens != NULL) { |
98 | free(tokens.buf); | 100 | array_free(tokens); |
99 | } | 101 | } |
100 | return; | 102 | return; |
101 | } | 103 | } |
@@ -122,8 +124,8 @@ process_source(const StringView *source) { | |||
122 | pop_root(); | 124 | pop_root(); |
123 | } | 125 | } |
124 | 126 | ||
125 | if (tokens.buf != NULL) { | 127 | if (tokens != NULL) { |
126 | free(tokens.buf); | 128 | array_free(tokens); |
127 | } | 129 | } |
128 | } | 130 | } |
129 | 131 | ||