summaryrefslogtreecommitdiffstats
path: root/dimension
diff options
context:
space:
mode:
Diffstat (limited to 'dimension')
-rw-r--r--dimension/tokenize.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/dimension/tokenize.c b/dimension/tokenize.c
index e872e0c..33512ae 100644
--- a/dimension/tokenize.c
+++ b/dimension/tokenize.c
@@ -866,6 +866,11 @@ dmnsn_yylex_cleanup(void *yyscanner)
{
dmnsn_token_buffer *tbuffer = dmnsn_yyget_extra(yyscanner);
while (tbuffer) {
+ if (tbuffer->type == DMNSN_T_INCLUDE) {
+ dmnsn_yy_pop_buffer(yyscanner);
+ fclose(tbuffer->ptr);
+ }
+
dmnsn_token_buffer *prev = tbuffer->prev;
dmnsn_delete_token_buffer(tbuffer);
tbuffer = prev;