From: eap Date: Fri, 14 Dec 2012 12:16:42 +0000 (+0000) Subject: 21948: EDF SMESH : Memory is not freed when deleting a mesh X-Git-Tag: B4NGCMakeInt~10 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c847d2084f2233e9a361fac987e4adb064ef5f30;p=modules%2Fkernel.git 21948: EDF SMESH : Memory is not freed when deleting a mesh + delete [] aBuffer; --- diff --git a/src/HDFPersist/HDFascii.cc b/src/HDFPersist/HDFascii.cc index c8fd3acfd..e660f73d0 100644 --- a/src/HDFPersist/HDFascii.cc +++ b/src/HDFPersist/HDFascii.cc @@ -92,9 +92,11 @@ bool HDFascii::isASCII(const char* thePath) { read(fd, aBuffer, 8); close(fd); - if(strcmp(aBuffer, ASCIIHDF_ID) == 0) return true; + bool res = (strcmp(aBuffer, ASCIIHDF_ID) == 0); - return false; + delete [] aBuffer; + + return res; } //############################## HDF => ASCII ################################