From: jfa Date: Wed, 2 May 2007 10:28:40 +0000 (+0000) Subject: Fix memory problem. X-Git-Tag: T_EDF_15278 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d6aad189389b69ec7c4990b5faa327e20ce6afe9;p=modules%2Fsuperv.git Fix memory problem. --- diff --git a/src/Supervision/Graph_Impl.cxx b/src/Supervision/Graph_Impl.cxx index c0d7cf7..a6b976f 100644 --- a/src/Supervision/Graph_Impl.cxx +++ b/src/Supervision/Graph_Impl.cxx @@ -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 ,