Fix memory leaks found by coverity (CID 1098781 & 1098880)
[scilab.git] / scilab / modules / external_objects_java / src / cpp / ScilabJavaEnvironment.cpp
index 806fb43..fea094e 100644 (file)
@@ -396,7 +396,9 @@ std::vector<std::string> ScilabJavaEnvironment::getCompletion(int id, char ** fi
     for (int i = 0; i < len; i++)
     {
         v.push_back(fields[i]);
+        delete fields[i];
     }
+    delete fields;
 
     return v;
 }