]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
clean lex->frames in lex_close
authorWolfgang (Blub) Bumiller <blub@speed.at>
Sat, 18 Aug 2012 13:57:21 +0000 (15:57 +0200)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Sat, 18 Aug 2012 13:57:21 +0000 (15:57 +0200)
lexer.c

diff --git a/lexer.c b/lexer.c
index 222ed849623db71909330f83e383f6f04f49cd0a..d8fcf2e28f0a0257bfa8418ced003b206de70b4d 100644 (file)
--- a/lexer.c
+++ b/lexer.c
@@ -150,6 +150,11 @@ lex_file* lex_open(const char *file)
 
 void lex_close(lex_file *lex)
 {
+    size_t i;
+    for (i = 0; i < lex->frames_count; ++i)
+        mem_d(lex->frames[i].name);
+    MEM_VECTOR_CLEAR(lex, frames);
+
     if (lex->file)
         fclose(lex->file);
     if (lex->tok)