ast: fix memleaks detected by ASAN during testing
[scilab.git] / scilab / modules / ast / src / cpp / operations / types_power.cpp
index 7c4190c..7e9c020 100644 (file)
@@ -540,6 +540,12 @@ int DotPowerSpaseByDouble(Sparse* _pSp, Double* _pDouble, InternalType** _pOut)
             std::complex<double> cplx(ppDblGet->get(0), ppDblGet->getImg(0));
             pSpTemp->set(iPositVal[i], cplx, false);
         }
+
+        if (ppDblGet)
+        {
+            ppDblGet->killMe();
+            ppDblGet = NULL;
+        }
     }
 
     delete[] Col;