[core][calpol] Mismatched delete fixed. 19/17719/2
Cedric Delamarre [Mon, 25 Jan 2016 15:54:06 +0000 (16:54 +0100)]
test_run core calpol
test_run core calpol mode_nwni_profiling

Change-Id: I9dcb964875556e0e6a6fae45ac51ce0c5ab31940

scilab/modules/polynomials/sci_gateway/cpp/sci_bezout.cpp
scilab/modules/polynomials/sci_gateway/cpp/sci_pppdiv.cpp

index 9f9ec88..6a85cc2 100644 (file)
@@ -99,7 +99,7 @@ types::Function::ReturnValue sci_bezout(types::typed_list &in, int _iRetCount, t
     int ipb[6];
 
     C2F(recbez)(pdblIn[0], piDegree, pdblIn[1], piDegree + 1, pdblOut, ipb, pdblWork, &dblErr);
-    delete pdblWork;
+    delete[] pdblWork;
 
     // create result
     int np = ipb[1] - ipb[0];
@@ -128,7 +128,7 @@ types::Function::ReturnValue sci_bezout(types::typed_list &in, int _iRetCount, t
         delete pSPU;
     }
 
-    delete pdblOut;
+    delete[] pdblOut;
 
     // return result
     out.push_back(pPolyGCD);
index fa99f8a..b29da60 100644 (file)
@@ -291,15 +291,15 @@ types::Function::ReturnValue sci_pppdiv(types::typed_list &in, int _iRetCount, t
         out.push_back(pPolyOut);
     }
 
-    delete pdblInR[0];
+    delete[] pdblInR[0];
     if (pbComplex[0] || pbComplex[1])
     {
-        delete pdblInI[0];
+        delete[] pdblInI[0];
     }
 
     if (pbComplex[1] == false)
     {
-        delete pdblInI[1];
+        delete[] pdblInI[1];
     }
 
     return types::Function::OK;