We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent be47d1b commit d93d607Copy full SHA for d93d607
libcob/call.c
@@ -297,8 +297,7 @@ cob_create_call_stack_list (char *name)
297
struct call_stack_list *new_list = malloc (sizeof (struct call_stack_list));
298
memset (new_list, 0, sizeof (struct call_stack_list));
299
new_list->parent = current_call_stack_list;
300
- new_list->name = malloc (strlen (name) + 1);
301
- strcpy (new_list->name, name);
+ new_list->name = strdup (name);
302
current_call_stack_list = new_list;
303
return new_list;
304
}
0 commit comments