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)
294
294
static struct call_stack_list *
295
295
cob_create_call_stack_list (char * name )
296
296
{
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 ));
298
298
memset (new_list , 0 , sizeof (struct call_stack_list ));
299
299
new_list -> parent = current_call_stack_list ;
300
- new_list -> name = cob_malloc (strlen (name ) + 1 );
300
+ new_list -> name = malloc (strlen (name ) + 1 );
301
301
strcpy (new_list -> name , name );
302
302
current_call_stack_list = new_list ;
303
303
return new_list ;
@@ -319,6 +319,8 @@ cob_cancel_call_stack_list (struct call_stack_list *p)
319
319
if (p -> sister ) {
320
320
cob_cancel_call_stack_list (p -> sister );
321
321
}
322
+ free (p -> name );
323
+ free (p );
322
324
}
323
325
324
326
const char *
@@ -784,5 +786,6 @@ cob_cancel_all ()
784
786
return ;
785
787
}
786
788
cob_cancel_call_stack_list (current_call_stack_list -> children );
789
+ current_call_stack_list -> children = NULL ;
787
790
return ;
788
791
}
You can’t perform that action at this time.
0 commit comments