Coverity #1099169, #1320913, #1321304 fixed
[scilab.git] / scilab / modules / scicos_blocks / src / cpp / fromws_c.cpp
index 235fb57..347e1b7 100644 (file)
@@ -410,6 +410,7 @@ SCICOS_BLOCKS_IMPEXP void fromws_c(scicos_block* block, int flag)
                 *work = nullptr;
                 delete[] (char*) ptr->work;
                 delete[] ptr;
+                delete[] ptDims;
                 closeHDF5File(fd);
                 return;
             }
@@ -420,6 +421,7 @@ SCICOS_BLOCKS_IMPEXP void fromws_c(scicos_block* block, int flag)
                 *work = nullptr;
                 delete[] (char*) ptr->work;
                 delete[] ptr;
+                delete[] ptDims;
                 closeHDF5File(fd);
                 return;
             }
@@ -435,6 +437,7 @@ SCICOS_BLOCKS_IMPEXP void fromws_c(scicos_block* block, int flag)
                 delete[] (char*) ptr->work;
                 delete[] ptr;
                 closeHDF5File(fd);
+                return;
             }
 
             /* Close the file */