diff --git a/poincare/src/power.cpp b/poincare/src/power.cpp index 155065413..addb4f3f8 100644 --- a/poincare/src/power.cpp +++ b/poincare/src/power.cpp @@ -106,7 +106,9 @@ template Matrix * Power::computeOnMatrixAndComplex(const Matrix * m, delete result; return nullptr; } - result = Multiplication::computeOnMatrices(result, m); + Matrix * mult = Multiplication::computeOnMatrices(result, m); + delete result; + result = mult; } return result; }