mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-12-26 09:20:35 +05:00
Fix valgrind error: Mismatched free() / delete / delete []
This commit is contained in:
parent
2736f682fe
commit
dbb1bb16ca
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user