This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch: FYI: fix for PR java/17575


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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]