]> Creatis software - gdcm.git/blobdiff - src/gdcmParsePixels.cxx
ENH: change malloc/calloc/free with there c++ equivalent
[gdcm.git] / src / gdcmParsePixels.cxx
index 241bd81856d7ea7a9f6f790b9a92529300d5dd3f..c7233f3026ff494a411ccaa4843935fb32e5fa31 100644 (file)
@@ -79,7 +79,7 @@ bool gdcmFile::ParsePixelData(void) {
             (unsigned)ftellRes,ln,ln);
       if (ln != 0) {
          // What is it used for ??
-         char * BasicOffsetTableItemValue= (char *)malloc(ln+1);
+         char * BasicOffsetTableItemValue= new char[ln+1];
          fread(BasicOffsetTableItemValue,ln,1,fp); 
          guint32 a;
          for (int i=0;i<ln;i+=4){
@@ -152,7 +152,7 @@ bool gdcmFile::ParsePixelData(void) {
             (unsigned)ftellRes,ln,ln);
       if (ln != 0) {
          // What is it used for ??
-         char * BasicOffsetTableItemValue= (char *)malloc(ln+1);
+         char * BasicOffsetTableItemValue= new char[ln+1];
          fread(BasicOffsetTableItemValue,ln,1,fp); 
          guint32 a;
          for (int i=0;i<ln;i+=4){