diff options
author | Mark Wielaard <mark@klomp.org> | 2005-01-09 13:54:34 +0000 |
---|---|---|
committer | Mark Wielaard <mark@gcc.gnu.org> | 2005-01-09 13:54:34 +0000 |
commit | b927d3a45120ee708b6579bd482bb75d627ebd9d (patch) | |
tree | 36c506c4a7e19915d85364c6a0dde34fd15d7d22 /gcc/java/parse.y | |
parent | e1a5510b3d36fe1b0dfa1cb2c81cd6fdb1dd1c3d (diff) | |
download | gcc-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.y | 8 |
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; |