]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Mismatched delete / delete []
authoreap <eap@opencascade.com>
Fri, 6 Feb 2009 08:20:03 +0000 (08:20 +0000)
committereap <eap@opencascade.com>
Fri, 6 Feb 2009 08:20:03 +0000 (08:20 +0000)
src/HDFPersist/HDFascii.cc

index b8247fb8dd1e9f219eb5d3f9748bae7a05ddcd3e..2884311b3fb8024b001712bd33f36899c480c669 100644 (file)
@@ -447,7 +447,7 @@ bool CreateGroupFromASCII(HDFcontainerObject *father, FILE *fp)
 
   HDFgroup* hdf_group = new HDFgroup(new_name, father);
 
-  delete new_name;
+  delete [] new_name;
 
   hdf_group->CreateOnDisk();
 
@@ -526,8 +526,8 @@ bool CreateDatasetFromASCII(HDFcontainerObject *father, FILE *fp)
     order = H5T_ORDER_NONE;
 
   HDFdataset* hdf_dataset = new HDFdataset(new_name, father,type, sizeArray, nbDim, order);
-  delete new_name;
-  delete sizeArray;
+  delete [] new_name;
+  delete [] sizeArray;
 
   hdf_dataset->CreateOnDisk();
 
@@ -535,7 +535,7 @@ bool CreateDatasetFromASCII(HDFcontainerObject *father, FILE *fp)
     char *val = new char[size+1];
     fread(val, 1, size, fp);
     hdf_dataset->WriteOnDisk(val);
-    delete val;
+    delete [] val;
   } else if (type == HDF_FLOAT64) {
     hdf_float64* val = new hdf_float64[size];
     for(i=0; i<size; i++) {