diff options
author | David Malcolm <dmalcolm@redhat.com> | 2014-11-19 19:08:29 +0000 |
---|---|---|
committer | David Malcolm <dmalcolm@gcc.gnu.org> | 2014-11-19 19:08:29 +0000 |
commit | 0ef443cf01de9153f66d9327784c6137d387dade (patch) | |
tree | 3e05b6e27cfe2411e105ee9403deb3eeafd30ef0 /gcc/opts.c | |
parent | 3bdf0a9ba51c25ab13d5f37e311d77c12aca55ae (diff) | |
download | gcc-0ef443cf01de9153f66d9327784c6137d387dade.zip gcc-0ef443cf01de9153f66d9327784c6137d387dade.tar.gz gcc-0ef443cf01de9153f66d9327784c6137d387dade.tar.bz2 |
PR jit/63854: Fix memory leak within gcc_options
gcc/ChangeLog:
PR jit/63854
* opts.c (finalize_options_struct): New.
* opts.h (finalize_options_struct): New.
* toplev.c (toplev::finalize): Call finalize_options_struct
on global_options and global_options_set.
From-SVN: r217791
Diffstat (limited to 'gcc/opts.c')
-rw-r--r-- | gcc/opts.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -307,6 +307,14 @@ init_options_struct (struct gcc_options *opts, struct gcc_options *opts_set) targetm_common.option_init_struct (opts); } +/* Release any allocations owned by OPTS. */ + +void +finalize_options_struct (struct gcc_options *opts) +{ + XDELETEVEC (opts->x_param_values); +} + /* If indicated by the optimization level LEVEL (-Os if SIZE is set, -Ofast if FAST is set, -Og if DEBUG is set), apply the option DEFAULT_OPT to OPTS and OPTS_SET, diagnostic context DC, location LOC, with language |