File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -294,10 +294,10 @@ init_call_stack_list (void)
294294static struct call_stack_list *
295295cob_create_call_stack_list (char * name )
296296{
297- struct call_stack_list * new_list = cob_malloc (sizeof (struct call_stack_list ));
297+ struct call_stack_list * new_list = malloc (sizeof (struct call_stack_list ));
298298 memset (new_list , 0 , sizeof (struct call_stack_list ));
299299 new_list -> parent = current_call_stack_list ;
300- new_list -> name = cob_malloc (strlen (name ) + 1 );
300+ new_list -> name = malloc (strlen (name ) + 1 );
301301 strcpy (new_list -> name , name );
302302 current_call_stack_list = new_list ;
303303 return new_list ;
@@ -319,6 +319,8 @@ cob_cancel_call_stack_list (struct call_stack_list *p)
319319 if (p -> sister ) {
320320 cob_cancel_call_stack_list (p -> sister );
321321 }
322+ free (p -> name );
323+ free (p );
322324}
323325
324326const char *
@@ -784,5 +786,6 @@ cob_cancel_all ()
784786 return ;
785787 }
786788 cob_cancel_call_stack_list (current_call_stack_list -> children );
789+ current_call_stack_list -> children = NULL ;
787790 return ;
788791}
You can’t perform that action at this time.
0 commit comments