projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f8fac47
)
fix memory leak in optimize pragma parsing
author
Richard Biener
<rguenther@suse.de>
Wed, 10 Feb 2021 10:28:30 +0000
(11:28 +0100)
committer
Richard Biener
<rguenther@suse.de>
Wed, 10 Feb 2021 13:51:58 +0000
(14:51 +0100)
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.
gcc/c-family/c-common.c
patch
|
blob
|
history
diff --git
a/gcc/c-family/c-common.c
b/gcc/c-family/c-common.c
index 813212cc21d64edc39707f6fc57666bfe3856abf..088626d1e0959826dd5de4e15ad855a26599763d 100644
(file)
--- 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();