Xcos MVC: fix valgrind detected invalid access
[scilab.git] / scilab / modules / elementary_functions / src / cpp / sum.cpp
index 932fc51..5077f50 100644 (file)
@@ -62,7 +62,7 @@ types::Double* sum(types::Double* pIn, int iOrientation)
         // init output
         pOut->setZeros();
 
-        delete piDims;
+        delete[] piDims;
         piDims = NULL;
 
         // perform operations
@@ -99,7 +99,7 @@ types::Double* sum(types::Double* pIn, int iOrientation)
             }
         }
 
-        delete piIndex;
+        delete[] piIndex;
         piIndex = NULL;
     }