[poincare] Fix memory leak in mapReduce

This commit is contained in:
Émilie Feral
2018-07-19 10:55:07 +02:00
committed by EmilieNumworks
parent fba21344b1
commit 2d30b24d4f

View File

@@ -78,6 +78,7 @@ template<typename T> Evaluation<T> * ApproximationEngine::mapReduce(const Expres
result = intermediateResult;
assert(result != nullptr);
if (result->isUndefined()) {
delete result;
return new Complex<T>(Complex<T>::Undefined());
}
}