Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions libcob/call.c
Original file line number Diff line number Diff line change
Expand Up @@ -294,11 +294,10 @@ init_call_stack_list (void)
static struct call_stack_list *
cob_create_call_stack_list (char *name)
{
struct call_stack_list *new_list = cob_malloc (sizeof (struct call_stack_list));
struct call_stack_list *new_list = malloc (sizeof (struct call_stack_list));
memset (new_list, 0, sizeof (struct call_stack_list));
new_list->parent = current_call_stack_list;
new_list->name = cob_malloc (strlen (name) + 1);
strcpy (new_list->name, name);
new_list->name = strdup (name);
current_call_stack_list = new_list;
return new_list;
}
Expand All @@ -319,6 +318,8 @@ cob_cancel_call_stack_list (struct call_stack_list *p)
if (p->sister) {
cob_cancel_call_stack_list (p->sister);
}
free (p->name);
free (p);
}

const char *
Expand Down Expand Up @@ -784,5 +785,6 @@ cob_cancel_all ()
return;
}
cob_cancel_call_stack_list (current_call_stack_list->children);
current_call_stack_list->children = NULL;
return;
}