diff options
author | Aldy Hernandez <aldyh@redhat.com> | 2004-05-28 21:58:15 +0000 |
---|---|---|
committer | Aldy Hernandez <aldyh@gcc.gnu.org> | 2004-05-28 21:58:15 +0000 |
commit | 9e6f2e7dcaf419d7db9e0ae7342a1f7bfb98ba26 (patch) | |
tree | 5bd076cd2ac75812aeaae2684012039f7849c450 /gcc | |
parent | 0d0bc03606fc5c4d655130b9f060b018412187cf (diff) | |
download | gcc-9e6f2e7dcaf419d7db9e0ae7342a1f7bfb98ba26.zip gcc-9e6f2e7dcaf419d7db9e0ae7342a1f7bfb98ba26.tar.gz gcc-9e6f2e7dcaf419d7db9e0ae7342a1f7bfb98ba26.tar.bz2 |
decl.c (cp_make_fname_decl): Free return value from fname_as_string.
* decl.c (cp_make_fname_decl): Free return value from
fname_as_string.
From-SVN: r82382
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/decl.c | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 5ba4800..c436ce7 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2004-05-28 Aldy Hernandez <aldyh@redhat.com> + + * decl.c (cp_make_fname_decl): Free return value from + fname_as_string. + 2004-05-28 Mark Mitchell <mark@codesourcery.com> PR c++/14668 diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 8a464be..92f6d14 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -3087,6 +3087,9 @@ cp_make_fname_decl (tree id, int type_dep) tree init = cp_fname_init (name, &type); tree decl = build_decl (VAR_DECL, id, type); + if (name) + free ((char *) name); + /* As we're using pushdecl_with_scope, we must set the context. */ DECL_CONTEXT (decl) = current_function_decl; DECL_PRETTY_FUNCTION_P (decl) = type_dep; |