diff options
author | Jakub Jelinek <jakub@redhat.com> | 2011-11-11 09:15:56 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2011-11-11 09:15:56 +0100 |
commit | ca3e7c9ffdf8d0478f51c49e68c5f13eb90fe8c4 (patch) | |
tree | 291ec2bfa4e2893e68548230cb4d74aeb094277c /gcc/opts-common.c | |
parent | d3cfd39e65e6f783ff5fa83fdfa49f3ab979298c (diff) |
opts-common.c (generate_canonical_option): Free opt_text it it has been allocated here and not stored anywhere.
* opts-common.c (generate_canonical_option): Free opt_text
it it has been allocated here and not stored anywhere.
From-SVN: r181282
Diffstat (limited to 'gcc/opts-common.c')
-rw-r--r-- | gcc/opts-common.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/opts-common.c b/gcc/opts-common.c index 00edbe6601c..354bce07dc2 100644 --- a/gcc/opts-common.c +++ b/gcc/opts-common.c @@ -304,6 +304,8 @@ generate_canonical_option (size_t opt_index, const char *arg, int value, decoded->canonical_option[0] = concat (opt_text, arg, NULL); decoded->canonical_option[1] = NULL; decoded->canonical_option_num_elements = 1; + if (opt_text != option->opt_text) + free (CONST_CAST (char *, opt_text)); } } else |