summaryrefslogtreecommitdiff
path: root/gcc/opts-common.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2011-11-11 08:15:56 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2011-11-11 08:15:56 +0000
commitfcf50e59d8e7c87647d88719bded2a1f2fb265cb (patch)
tree291ec2bfa4e2893e68548230cb4d74aeb094277c /gcc/opts-common.c
parent3c7a3fca3987b22e1665fa72c41bac657a9e0a2d (diff)
downloadgcc-fcf50e59d8e7c87647d88719bded2a1f2fb265cb.tar.gz
* opts-common.c (generate_canonical_option): Free opt_text
it it has been allocated here and not stored anywhere. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181282 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/opts-common.c')
-rw-r--r--gcc/opts-common.c2
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