Fix memory leak (#300)
Free memory allocated to temp before returning from the function.
This commit is contained in:
@@ -558,6 +558,7 @@ void StandardCalculatorViewModel::HandleUpdatedOperandData(Command cmdenum)
|
||||
length = m_selectedExpressionLastData->Length() + 1;
|
||||
if (length > 50)
|
||||
{
|
||||
delete [] temp;
|
||||
return;
|
||||
}
|
||||
for (; i < length; ++i)
|
||||
|
Reference in New Issue
Block a user