fix memory leak in optimize pragma parsing
The optimize pragma/attribute parsing calls decode_cmdline_options_to_array but doesn't free the array. The following fixes that. 2021-02-10 Richard Biener <rguenther@suse.de> gcc/c-family/ * c-common.c (parse_optimize_options): Free decoded_options.
This commit is contained in:
parent
f8fac476b5
commit
e4985357e5
@ -5770,6 +5770,7 @@ parse_optimize_options (tree args, bool attr_p)
|
|||||||
decode_options (&global_options, &global_options_set,
|
decode_options (&global_options, &global_options_set,
|
||||||
decoded_options, decoded_options_count,
|
decoded_options, decoded_options_count,
|
||||||
input_location, global_dc, NULL);
|
input_location, global_dc, NULL);
|
||||||
|
free (decoded_options);
|
||||||
|
|
||||||
targetm.override_options_after_change();
|
targetm.override_options_after_change();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user