Correct string allocation

This commit is contained in:
jfa 2005-11-23 15:38:24 +00:00
parent ccbdd44178
commit 8a0889f44b

View File

@ -134,8 +134,8 @@ void GEOM_Object_i::SetStudyEntry(const char* theEntry)
char* GEOM_Object_i::GetStudyEntry() char* GEOM_Object_i::GetStudyEntry()
{ {
TCollection_AsciiString anEntry = _impl->GetAuxData(); TCollection_AsciiString anEntry = _impl->GetAuxData();
if(!anEntry.IsEmpty()) return strdup(anEntry.ToCString()); if(!anEntry.IsEmpty()) return CORBA::string_dup(anEntry.ToCString());
return strdup(""); return CORBA::string_dup("");
} }