summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2004-09-21 16:28:40 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2004-09-21 16:28:40 +0000
commitd12e862b93167edd9aee40bdad48a00e60cf5514 (patch)
tree6fc21ebcc05618791a47bbb5484e42715e70b9dd
parentde6677cbe3d661c01e25c5f6d12721cadc4e9acf (diff)
downloadppe42-gcc-d12e862b93167edd9aee40bdad48a00e60cf5514.tar.gz
ppe42-gcc-d12e862b93167edd9aee40bdad48a00e60cf5514.zip
PR java/17575:
* gjavah.c (free_method_name_list): New method. (main): Call it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87812 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/java/ChangeLog6
-rw-r--r--gcc/java/gjavah.c17
2 files changed, 23 insertions, 0 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index f0311cc5049..255eaaa6bba 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,9 @@
+2004-09-21 Tom Tromey <tromey@redhat.com>
+
+ PR java/17575:
+ * gjavah.c (free_method_name_list): New method.
+ (main): Call it.
+
2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
Zack Weinberg <zack@codesourcery.com>
diff --git a/gcc/java/gjavah.c b/gcc/java/gjavah.c
index 8f53df192ff..d62e585758e 100644
--- a/gcc/java/gjavah.c
+++ b/gcc/java/gjavah.c
@@ -636,6 +636,22 @@ name_is_method_p (const unsigned char *name, int length)
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 @@ main (int argc, char** argv)
}
}
}
+ free_method_name_list ();
process_file (&jcf, out);
JCF_FINISH (&jcf);
if (current_output_file != output_file)
OpenPOWER on IntegriCloud