]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
remove memory leak on strdup during TCollection_AsciiString creation
authorptv <ptv@opencascade.com>
Tue, 4 Jul 2006 12:03:26 +0000 (12:03 +0000)
committerptv <ptv@opencascade.com>
Tue, 4 Jul 2006 12:03:26 +0000 (12:03 +0000)
src/GEOM_I/GEOM_Gen_i.cc

index 9c47655e710242874b211e76d342f5054f44a96d..38881f2a9e8f55d17ed5599f49330189e5eeefcc 100644 (file)
@@ -247,7 +247,7 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::PublishInStudy(SALOMEDS::Study_ptr theStudy,
     aShapeName = aNewShapeName;
   }
   else // MOST PROBABLY CALLED FROM GEOM GUI (ALREADY WITH VALID NAME)
-    aShapeName = TCollection_AsciiString(strdup(theName));
+    aShapeName = TCollection_AsciiString((char *)theName);
 
   //Set the study entry as a name of  the published GEOM_Object
   aShape->SetStudyEntry(aResultSO->GetID());