diff options
author | Richard Biener <rguenther@suse.de> | 2021-02-10 11:28:30 +0100 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2021-02-10 14:51:58 +0100 |
commit | e4985357e5aea698cbb5620fbfccc995363c7764 (patch) | |
tree | 9dcb5cb68c36451d55af1f40db7dc203bb09c363 /gcc | |
parent | f8fac476b5ce4b9a37ea2b257d9da810f8c507be (diff) | |
download | gcc-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.c | 1 |
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(); |