mirror of
https://github.com/Microsoft/calculator.git
synced 2025-07-13 00:32:52 -07:00
Fix memory leak (#300)
Free memory allocated to temp before returning from the function.
This commit is contained in:
parent
a5e07418df
commit
7cad778cc0
1 changed files with 1 additions and 0 deletions
|
@ -558,6 +558,7 @@ void StandardCalculatorViewModel::HandleUpdatedOperandData(Command cmdenum)
|
|||
length = m_selectedExpressionLastData->Length() + 1;
|
||||
if (length > 50)
|
||||
{
|
||||
delete [] temp;
|
||||
return;
|
||||
}
|
||||
for (; i < length; ++i)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue