0022232: [CEA 837] Memory corruption in GEOM/SMESH that leads to segfault on debian64

Fix "Mismatched free() / delete / delete []" valgrind error
- fix GEOM_Object_i::GetName() as GEOM_Object::GetName() now returns TCollection_AsciiString
This commit is contained in:
eap 2013-06-19 14:25:16 +00:00
parent 1d2e9cb443
commit 5de463a68d

View File

@ -207,10 +207,8 @@ void GEOM_Object_i::SetName(const char* theName)
//=============================================================================
char* GEOM_Object_i::GetName()
{
char* aName = _impl->GetName();
if (aName)
return aName; // this is already copy of pointer (see implementation of _impl)
return CORBA::string_dup("");
TCollection_AsciiString aName = _impl->GetName();
return CORBA::string_dup( aName.ToCString() );
}
//=============================================================================