This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch: FYI: fix for PR java/17575
- From: Tom Tromey <tromey at redhat dot com>
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Cc: Gcc Patch List <gcc-patches at gcc dot gnu dot org>
- Date: 21 Sep 2004 10:25:44 -0600
- Subject: Patch: FYI: fix for PR java/17575
- Reply-to: tromey at redhat dot com
I'm checking this in on the trunk.
This fixes PR 17575.
Tom
Index: ChangeLog
from Tom Tromey <tromey@redhat.com>
PR java/17575:
* gjavah.c (free_method_name_list): New method.
(main): Call it.
Index: gjavah.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/gjavah.c,v
retrieving revision 1.118
diff -u -r1.118 gjavah.c
--- gjavah.c 24 Jul 2004 00:03:27 -0000 1.118
+++ gjavah.c 21 Sep 2004 16:25:02 -0000
@@ -636,6 +636,22 @@
return 0;
}
+/* Free the method name list. */
+static void
+free_method_name_list ()
+{
+ struct method_name *p = method_name_list;
+ while (p != NULL)
+ {
+ struct method_name *next = p->next;
+ free (p->name);
+ free (p->signature);
+ free (p);
+ p = next;
+ }
+ method_name_list = NULL;
+}
+
/* If there is already a native method named NAME, whose signature is not
SIGNATURE, then return true. Otherwise return false. */
static int
@@ -2530,6 +2546,7 @@
}
}
}
+ free_method_name_list ();
process_file (&jcf, out);
JCF_FINISH (&jcf);
if (current_output_file != output_file)