[poincare] Fix memory leak: parsed expression must be delete

This commit is contained in:
Émilie Feral
2018-05-11 17:58:18 +02:00
parent 246afc26da
commit db38f027d4

View File

@@ -301,6 +301,7 @@ bool ExpressionLayoutField::handleEventWithText(const char * text, bool indentat
return false;
}
Poincare::ExpressionLayout * resultLayout = resultExpression->createLayout();
delete resultExpression;
// Find the pointed layout.
Poincare::ExpressionLayout * pointedLayout = nullptr;
if (resultLayout->isHorizontal()) {