Coverity #1321214, #1321215, #1321217, #1321220, #1321223, #1321224, #1321221, #13212...
[scilab.git] / scilab / modules / optimization / sci_gateway / cpp / sci_fsolve.cpp
index 133baa0..9f244d5 100644 (file)
@@ -290,20 +290,20 @@ types::Function::ReturnValue sci_fsolve(types::typed_list &in, int _iRetCount, t
         sciprint(_("%s: exception caught in '%s' subroutine.\n"), "fsolve", pstrFunc);
         Scierror(999, pstrMsg);
         FREE(pstrMsg);
-        delete pdblWork;
+        delete[] pdblWork;
         delete pDblX;
         if (pdblJac)
         {
-            delete pdblJac;
+            delete[] pdblJac;
         }
 
         return types::Function::Error;
     }
 
-    delete pdblWork;
+    delete[] pdblWork;
     if (pdblJac)
     {
-        delete pdblJac;
+        delete[] pdblJac;
     }
 
     /*** return output arguments ***/