Fix memory leaks found by coverity (CID 1098781 & 1098880)
[scilab.git] / scilab / modules / external_objects_java / sci_gateway / cpp / sci_jconvMatrixMethod.cpp
index 50937fe..db72e08 100644 (file)
@@ -76,10 +76,13 @@ int sci_jconvMatrixMethod(char * fname, unsigned long fname_len)
     }
     else
     {
+        delete type;
         Scierror(999, "%s: Invalid string: \"rc\" or \"cr\" expected.", fname);
         return 0;
     }
 
+    delete type;
+
     LhsVar(1) = 0;
     PutLhsVar();