Coverity #1099041, #1320965 fixed 36/18236/3
Dhruv Khattar [Sun, 12 Jun 2016 08:16:45 +0000 (13:16 +0530)]
Change-Id: I85fbb119593925c5415158afd016f310bd3abc6c

scilab/modules/types/src/cpp/ScilabToJava.cpp

index e4eec46..81c70e7 100644 (file)
@@ -35,8 +35,10 @@ void ScilabToJava::sendAllListenedVariables()
     while (*vars)
     {
         sendVariable(std::string(*vars), true, refreshId);
+        delete[] *vars;
         vars++;
     }
+    delete[] vars;
 }
 
 bool ScilabToJava::sendVariableAsReference(const std::string & name, int handlerId)
@@ -130,7 +132,7 @@ bool ScilabToJava::sendVariable(const std::string & name, std::vector<int> & ind
     int rc;
     int * nbCoeffs = 0;
     char varName[5];
-    int varNameLen;
+    int varNameLen = 0;
 
     // Lists
     char listtype = 0;