Fix memory leak in LTO

2017-02-14  Martin Liska  <mliska@suse.cz>

	* lto.c (do_stream_out): Free LTO file filename string.

From-SVN: r245431
This commit is contained in:
Martin Liska 2017-02-14 15:56:11 +01:00 committed by Martin Liska
parent da9cd04455
commit 4a44a5f3eb
2 changed files with 6 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2017-02-14 Martin Liska <mliska@suse.cz>
* lto.c (do_stream_out): Free LTO file filename string.
2017-01-19 David Malcolm <dmalcolm@redhat.com>
* lto-lang.c (builtin_type_for_size): Convert call to

View File

@ -2288,6 +2288,8 @@ do_stream_out (char *temp_filename, lto_symtab_encoder_t encoder)
ipa_write_optimization_summaries (encoder);
free (CONST_CAST (char *, file->filename));
lto_set_current_out_file (NULL);
lto_obj_file_close (file);
free (file);