diff --git a/source/interpreter.c b/source/interpreter.c index 371dccd..75acbe4 100644 --- a/source/interpreter.c +++ b/source/interpreter.c @@ -461,8 +461,10 @@ static bool execVarDecl(Interpreter* interpreter, bool lng) { printLiteralCustom(identifier, interpreter->errorOutput); interpreter->errorOutput("\"\n"); - freeLiteral(identifier); - freeLiteral(type); + if (freeType) { + freeLiteral(type); + } + freeLiteral(val); return false;