mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-24 11:30:34 +05:00
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:
parent
1d2e9cb443
commit
5de463a68d
@ -207,10 +207,8 @@ void GEOM_Object_i::SetName(const char* theName)
|
|||||||
//=============================================================================
|
//=============================================================================
|
||||||
char* GEOM_Object_i::GetName()
|
char* GEOM_Object_i::GetName()
|
||||||
{
|
{
|
||||||
char* aName = _impl->GetName();
|
TCollection_AsciiString aName = _impl->GetName();
|
||||||
if (aName)
|
return CORBA::string_dup( aName.ToCString() );
|
||||||
return aName; // this is already copy of pointer (see implementation of _impl)
|
|
||||||
return CORBA::string_dup("");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
Loading…
Reference in New Issue
Block a user