From: eap Date: Wed, 13 Dec 2017 13:51:53 +0000 (+0300) Subject: Fix valgrind error: Mismatched free() / delete / delete [] X-Git-Tag: V9_0_0~1^2~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=dbb1bb16ca14054d9614ea3808bacd44d6752728;p=modules%2Fgeom.git Fix valgrind error: Mismatched free() / delete / delete [] --- diff --git a/src/GEOM_I/GEOM_DumpPython.cc b/src/GEOM_I/GEOM_DumpPython.cc index eb79a3ff9..72c6b7000 100644 --- a/src/GEOM_I/GEOM_DumpPython.cc +++ b/src/GEOM_I/GEOM_DumpPython.cc @@ -134,10 +134,10 @@ Engines::TMPFile* GEOM_Gen_i::DumpPython(CORBA::Object_ptr theStudy, anAttrStr = SALOMEDS::AttributeString::_narrow(anAttr); SALOMEDS::ListOfListOfStrings_var aSections = aStudy->ParseVariables(anAttrStr->Value()); ObjectStates* aStates = new ObjectStates(); - for(int i = 0; i < aSections->length(); i++) { + for( CORBA::ULong i = 0; i < aSections->length(); i++) { TState aState; SALOMEDS::ListOfStrings aListOfVars = aSections[i]; - for(int j = 0; j < aListOfVars.length(); j++) { + for( CORBA::ULong j = 0; j < aListOfVars.length(); j++) { bool isVar = aStudy->IsVariable(aListOfVars[j].in()); TVariable aVar = TVariable( (char*)aListOfVars[j].in(), isVar ); aState.push_back(aVar); @@ -282,7 +282,7 @@ char* GEOM_Gen_i::GetDumpName (const char* theStudyEntry) { const char* name = _impl->GetDumpName( theStudyEntry ); if ( name && strlen( name ) > 0 ) - return strdup( name ); + return CORBA::string_dup( name ); return NULL; }