]> SALOME platform Git repositories - modules/superv.git/commitdiff
Salome HOME
Fix memory problem. T_EDF_15278 T_PAL_15278
authorjfa <jfa@opencascade.com>
Wed, 2 May 2007 10:28:40 +0000 (10:28 +0000)
committerjfa <jfa@opencascade.com>
Wed, 2 May 2007 10:28:40 +0000 (10:28 +0000)
src/Supervision/Graph_Impl.cxx

index c0d7cf7eba9fb4f38584174ec399cd1528952b94..a6b976fca436624abd0946099f7932719988fffb 100644 (file)
@@ -516,12 +516,12 @@ SUPERV::LNode_ptr Graph_Impl::LNode( const char * InitName ,
       SALOME_ModuleCatalog::Service aVoidService = SALOME_ModuleCatalog::Service() ;
       char * anEndName ;
       if ( strlen( InitName ) ) {
-        anEndName = new char( 3 + strlen( InitName ) + 1 ) ;
+        anEndName = new char[ 3 + strlen( InitName ) + 1 ];
         strcpy( anEndName , "End" ) ;
         strcat( anEndName , InitName ) ;
       }
       else {
-        anEndName = new char( 3 + strlen( "Loop" ) + 1 ) ;
+        anEndName = new char[ 3 + strlen( "Loop" ) + 1 ];
         strcpy( anEndName , "EndLoop" ) ;
       }
       ELNode_Impl * myEndNode = new ELNode_Impl( _Orb , _Poa , _ContId ,