OSDN Git Service

* decl.c (cp_make_fname_decl): Free return value from
authoraldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 28 May 2004 21:58:15 +0000 (21:58 +0000)
committeraldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 28 May 2004 21:58:15 +0000 (21:58 +0000)
fname_as_string.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@82382 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cp/ChangeLog
gcc/cp/decl.c

index 5ba4800..c436ce7 100644 (file)
@@ -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
index 8a464be..92f6d14 100644 (file)
@@ -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;