summaryrefslogtreecommitdiffstats
path: root/gcc
diff options
context:
space:
mode:
authorburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>2012-10-08 16:51:10 +0000
committerburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>2012-10-08 16:51:10 +0000
commit14c7dd36b1e70fa779d4baacbc97113b0b53969b (patch)
tree5e25effe6d171d34559a55cef28f78485039dfdd /gcc
parent4ca17abf4c4eedb6eb5b67a9bdcc2fc1d19e9137 (diff)
downloadppe42-gcc-14c7dd36b1e70fa779d4baacbc97113b0b53969b.tar.gz
ppe42-gcc-14c7dd36b1e70fa779d4baacbc97113b0b53969b.zip
2012-10-08 Tobias Burnus <burnus@net-b.de>
* lto.c (lto_wpa_write_files, read_cgraph_and_symbols): Free lto_file struct after closing the file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192216 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/lto/ChangeLog5
-rw-r--r--gcc/lto/lto.c4
2 files changed, 9 insertions, 0 deletions
diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog
index 3fc713616ed..d9849b47698 100644
--- a/gcc/lto/ChangeLog
+++ b/gcc/lto/ChangeLog
@@ -1,3 +1,8 @@
+2012-10-08 Tobias Burnus <burnus@net-b.de>
+
+ * lto.c (lto_wpa_write_files, read_cgraph_and_symbols):
+ Free lto_file struct after closing the file.
+
2012-10-08 Jan Hubicka <jh@suse.cz>
* lto/lto.c (remember_with_vars): Also fixup INTEGER_CST.
diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c
index 81d7fb3d2e0..2b9156aebba 100644
--- a/gcc/lto/lto.c
+++ b/gcc/lto/lto.c
@@ -2674,6 +2674,7 @@ lto_wpa_write_files (void)
lto_set_current_out_file (NULL);
lto_obj_file_close (file);
+ free (file);
part->encoder = NULL;
len = strlen (temp_filename);
@@ -2690,6 +2691,7 @@ lto_wpa_write_files (void)
fatal_error ("closing LTRANS output list %s: %m", ltrans_output_list);
free_ltrans_partitions();
+ free (temp_filename);
timevar_pop (TV_WHOPR_WPA_IO);
}
@@ -2952,6 +2954,7 @@ read_cgraph_and_symbols (unsigned nfiles, const char **fnames)
if (!file_data)
{
lto_obj_file_close (current_lto_file);
+ free (current_lto_file);
current_lto_file = NULL;
break;
}
@@ -2959,6 +2962,7 @@ read_cgraph_and_symbols (unsigned nfiles, const char **fnames)
decl_data[last_file_ix++] = file_data;
lto_obj_file_close (current_lto_file);
+ free (current_lto_file);
current_lto_file = NULL;
ggc_collect ();
}
OpenPOWER on IntegriCloud