From: Aldy Hernandez Date: Fri, 28 May 2004 21:58:15 +0000 (+0000) Subject: decl.c (cp_make_fname_decl): Free return value from fname_as_string. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9e6f2e7dcaf419d7db9e0ae7342a1f7bfb98ba26;p=gcc.git 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 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 5ba48002055..c436ce75591 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2004-05-28 Aldy Hernandez + + * decl.c (cp_make_fname_decl): Free return value from + fname_as_string. + 2004-05-28 Mark Mitchell PR c++/14668 diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 8a464beba68..92f6d140b4b 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;