Skip to content

Commit 82f4423

Browse files
author
Noam Preil
committed
Fix last kernel memory leak
1 parent 267e1c4 commit 82f4423

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

assembler/directives.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ int handle_block(struct assembler_state *state, char **argv, int argc) {
152152

153153
if (error == EXPRESSION_BAD_SYMBOL) {
154154
ERROR(ERROR_UNKNOWN_SYMBOL, state->column, symbol);
155+
free_expression(expression);
155156
return 1;
156157
}
157158

@@ -167,6 +168,8 @@ int handle_block(struct assembler_state *state, char **argv, int argc) {
167168
result = 0;
168169
}
169170
}
171+
free(buffer);
172+
free_expression(expression);
170173
return 1;
171174
}
172175

0 commit comments

Comments
 (0)