about summary refs log tree commit diff
path: root/cccl.c
diff options
context:
space:
mode:
authorNakidai <nakidai@disroot.org>2025-03-31 17:29:52 +0300
committerNakidai <nakidai@disroot.org>2025-03-31 17:29:52 +0300
commitb8ba6128aa595ef1faa86ca4c69f5a3e7daa7c67 (patch)
treef75032bf0d2f333357eafa183d4963895c29965a /cccl.c
parentbcf4e58ffeb0b2193ecee08111757169376dd150 (diff)
download3cl-b8ba6128aa595ef1faa86ca4c69f5a3e7daa7c67.tar.gz
3cl-b8ba6128aa595ef1faa86ca4c69f5a3e7daa7c67.zip
Free file buffer after lexing
Diffstat (limited to 'cccl.c')
-rw-r--r--cccl.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/cccl.c b/cccl.c
index c574a87..477e235 100644
--- a/cccl.c
+++ b/cccl.c
@@ -2,6 +2,7 @@
 
 #include <stddef.h>
 #include <stdio.h>
+#include <stdlib.h>
 
 
 void cccl(struct cccl_File file)
@@ -12,6 +13,8 @@ void cccl(struct cccl_File file)
     if (verbose)
         fprintf(stderr, "Read: %lu\n", tokens_amount);
 
+    free(file.buffer);
+
     struct cccl_Node *parsed = cccl_parse(tokens, tokens_amount, 0, 0);
 
     struct cccl_Variables scope = {0};