aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2021-02-10 11:28:30 +0100
committerRichard Biener <rguenther@suse.de>2021-02-10 14:51:58 +0100
commite4985357e5aea698cbb5620fbfccc995363c7764 (patch)
tree9dcb5cb68c36451d55af1f40db7dc203bb09c363 /gcc
parentf8fac476b5ce4b9a37ea2b257d9da810f8c507be (diff)
downloadgcc-e4985357e5aea698cbb5620fbfccc995363c7764.zip
gcc-e4985357e5aea698cbb5620fbfccc995363c7764.tar.gz
gcc-e4985357e5aea698cbb5620fbfccc995363c7764.tar.bz2
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.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/c-family/c-common.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c
index 813212c..088626d 100644
--- a/gcc/c-family/c-common.c
+++ b/gcc/c-family/c-common.c
@@ -5770,6 +5770,7 @@ parse_optimize_options (tree args, bool attr_p)
decode_options (&global_options, &global_options_set,
decoded_options, decoded_options_count,
input_location, global_dc, NULL);
+ free (decoded_options);
targetm.override_options_after_change();