const char *add;
char post[32];
const char *sep;
+ char *buffer = NULL;
if (section_type == LTO_section_function_body)
{
if (name[0] == '*')
name++;
- char *buffer = (char *)xmalloc (strlen (name) + 32);
+ buffer = (char *)xmalloc (strlen (name) + 32);
sprintf (buffer, "%s.%d", name, node_order);
add = buffer;
sprintf (post, "." HOST_WIDE_INT_PRINT_HEX_PURE, f->id);
else
sprintf (post, "." HOST_WIDE_INT_PRINT_HEX_PURE, get_random_seed (false));
- return concat (section_name_prefix, sep, add, post, NULL);
+ char *res = concat (section_name_prefix, sep, add, post, NULL);
+ if (buffer)
+ free (buffer);
+ return res;
}
sort_partitions_by_post_order (pg, partitions);
gcc_assert (partitions->length () == (unsigned)num_sccs);
free_partition_graph_vdata (pg);
+ for_each_edge (pg, free_partition_graph_edata_cb, NULL);
free_graph (pg);
}