Fix memory leak on error

This commit is contained in:
Deukhoofd 2019-05-25 12:01:25 +02:00
parent b2fa857c9b
commit fe2007b095
No known key found for this signature in database
GPG Key ID: B4C087AC81641654
1 changed files with 2 additions and 0 deletions

View File

@ -23,6 +23,8 @@ NumericEvalValue* Evaluator::EvaluateIntegerBinary(BoundBinaryExpression *expres
result = leftValue -> operator/ (rightValue); result = leftValue -> operator/ (rightValue);
break; break;
default: default:
delete leftValue;
delete rightValue;
throw EvaluationException("Can't evaluate operation to numeric"); throw EvaluationException("Can't evaluate operation to numeric");
} }
delete leftValue; delete leftValue;