summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>1999-10-29 09:49:23 +0000
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>1999-10-29 09:49:23 +0000
commit0388e90f0664ab4bcd63ffb134d0fa3da1ee7da5 (patch)
tree610028a55913271a69abf4d597b12ed1df6999c0
parent97dbca2f7c40e761b965b41a6dca852183b8ce2e (diff)
downloadgcc-0388e90f0664ab4bcd63ffb134d0fa3da1ee7da5.tar.gz
* except.c (free_eh_nesting_info): Free the info itself.
* function.c (free_after_compilation): Don't free NULL. * gcse.c (alloc_pre_mem): Free the temp_bitmap, too. (pre_edge_insert): Free inserted. * stmt.c (free_stmt_status): Don't free NULL. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30255 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/except.c1
-rw-r--r--gcc/function.c3
-rw-r--r--gcc/gcse.c7
-rw-r--r--gcc/stmt.c4
5 files changed, 19 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 4435b727460..3680ac3bf0b 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+Fri Oct 29 02:51:35 1999 Mark Mitchell <mark@codesourcery.com>
+
+ * except.c (free_eh_nesting_info): Free the info itself.
+ * function.c (free_after_compilation): Don't free NULL.
+ * gcse.c (alloc_pre_mem): Free the temp_bitmap, too.
+ (pre_edge_insert): Free inserted.
+ * stmt.c (free_stmt_status): Don't free NULL.
+
1999-10-28 21:27 -0700 Zack Weinberg <zack@bitmover.com>
* cpplib.h (struct cpp_buffer: fname, nominal_fname,
diff --git a/gcc/except.c b/gcc/except.c
index 3c7692c4e90..c6f7bf5f6f2 100644
--- a/gcc/except.c
+++ b/gcc/except.c
@@ -3297,5 +3297,6 @@ free_eh_nesting_info (info)
free (info->handlers[x]);
free (info->handlers);
}
+ free (info);
}
}
diff --git a/gcc/function.c b/gcc/function.c
index 890f62bdbae..d5cdc2610cc 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -426,7 +426,8 @@ free_after_compilation (f)
if (free_machine_status)
(*free_machine_status) (f);
- free (f->x_parm_reg_stack_loc);
+ if (f->x_parm_reg_stack_loc)
+ free (f->x_parm_reg_stack_loc);
f->arg_offset_rtx = NULL;
f->return_rtx = NULL;
diff --git a/gcc/gcse.c b/gcc/gcse.c
index 9ce3ffbd2c6..7c0a1152fed 100644
--- a/gcc/gcse.c
+++ b/gcc/gcse.c
@@ -4108,8 +4108,8 @@ alloc_pre_mem (n_blocks, n_exprs)
transp = sbitmap_vector_alloc (n_blocks, n_exprs);
comp = sbitmap_vector_alloc (n_blocks, n_exprs);
antloc = sbitmap_vector_alloc (n_blocks, n_exprs);
-
temp_bitmap = sbitmap_vector_alloc (n_blocks, n_exprs);
+
pre_optimal = NULL;
pre_redundant = NULL;
pre_insert_map = NULL;
@@ -4130,6 +4130,7 @@ free_pre_mem ()
free (transp);
free (comp);
free (antloc);
+ free (temp_bitmap);
if (pre_optimal)
free (pre_optimal);
@@ -4535,6 +4536,10 @@ pre_edge_insert (edge_list, index_map)
}
}
}
+
+ /* Clean up. */
+ free (inserted);
+
return did_insert;
}
diff --git a/gcc/stmt.c b/gcc/stmt.c
index eeab664f6ce..f47e9fa4507 100644
--- a/gcc/stmt.c
+++ b/gcc/stmt.c
@@ -559,8 +559,8 @@ free_stmt_status (f)
/* We're about to free the function obstack. If we hold pointers to
things allocated there, then we'll try to mark them when we do
GC. So, we clear them out here explicitly. */
-
- free (f->stmt);
+ if (f->stmt)
+ free (f->stmt);
f->stmt = NULL;
}