aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/parse.y
diff options
context:
space:
mode:
authorMark Wielaard <mark@klomp.org>2005-01-09 13:54:34 +0000
committerMark Wielaard <mark@gcc.gnu.org>2005-01-09 13:54:34 +0000
commitb927d3a45120ee708b6579bd482bb75d627ebd9d (patch)
tree36c506c4a7e19915d85364c6a0dde34fd15d7d22 /gcc/java/parse.y
parente1a5510b3d36fe1b0dfa1cb2c81cd6fdb1dd1c3d (diff)
downloadgcc-b927d3a45120ee708b6579bd482bb75d627ebd9d.zip
gcc-b927d3a45120ee708b6579bd482bb75d627ebd9d.tar.gz
gcc-b927d3a45120ee708b6579bd482bb75d627ebd9d.tar.bz2
parse.y (process_imports): Allocate (and free) original_name only when not already defined.
* parse.y (process_imports): Allocate (and free) original_name only when not already defined. * jcf-parse.c (read_class): Free results of find_class() and lrealpath(). (java_parse_file): Keep pointer to head of file_list and free when done. Free result of lrealpath(). From-SVN: r93109
Diffstat (limited to 'gcc/java/parse.y')
-rw-r--r--gcc/java/parse.y8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/java/parse.y b/gcc/java/parse.y
index 815b51e..b09bb87 100644
--- a/gcc/java/parse.y
+++ b/gcc/java/parse.y
@@ -6955,14 +6955,14 @@ process_imports (void)
tree to_be_found = EXPR_WFL_NODE (TREE_PURPOSE (import));
char *original_name;
- original_name = xmemdup (IDENTIFIER_POINTER (to_be_found),
- IDENTIFIER_LENGTH (to_be_found),
- IDENTIFIER_LENGTH (to_be_found) + 1);
-
/* Don't load twice something already defined. */
if (IDENTIFIER_CLASS_VALUE (to_be_found))
continue;
+ original_name = xmemdup (IDENTIFIER_POINTER (to_be_found),
+ IDENTIFIER_LENGTH (to_be_found),
+ IDENTIFIER_LENGTH (to_be_found) + 1);
+
while (1)
{
tree left;