Fix memory leak (#300)

Free memory allocated to temp before returning from the function.
This commit is contained in:
Satya 2019-03-15 09:51:17 +05:30 committed by Howard Wolosky
parent a5e07418df
commit 7cad778cc0

View File

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