Fix memory leak

Free memory allocated to temp before returning from the function.
This commit is contained in:
Satya 2019-03-14 16:27:12 +05:30 committed by GitHub
commit 9025c9444d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -525,6 +525,7 @@ void StandardCalculatorViewModel::HandleUpdatedOperandData(Command cmdenum)
length = m_selectedExpressionLastData->Length() + 1;
if (length > 50)
{
delete [] temp;
return;
}
for (; i < length; ++i)