From dbb1bb16ca14054d9614ea3808bacd44d6752728 Mon Sep 17 00:00:00 2001 From: eap Date: Wed, 13 Dec 2017 16:51:53 +0300 Subject: [PATCH] Fix valgrind error: Mismatched free() / delete / delete [] --- src/GEOM_I/GEOM_DumpPython.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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; } -- 2.39.2