Fix memory leak on tables
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2019-06-12 18:47:34 +02:00
parent 22149d9243
commit 0339c44a89

View File

@@ -435,6 +435,7 @@ BoundExpression *Binder::BindTableExpression(ParsedTableExpression *expression)
this -> _scope = currentScope; this -> _scope = currentScope;
auto tableType = shared_ptr<TableScriptType>(new TableScriptType(tableScope, innerScope->GetDeepestScope())); auto tableType = shared_ptr<TableScriptType>(new TableScriptType(tableScope, innerScope->GetDeepestScope()));
delete innerScope;
return new BoundTableExpression((BoundBlockStatement*)block, tableType, expression->GetStartPosition(), expression->GetLength()); return new BoundTableExpression((BoundBlockStatement*)block, tableType, expression->GetStartPosition(), expression->GetLength());
} }