Skip to content

Commit

Permalink
Call release_input_file only if file is claimed
Browse files Browse the repository at this point in the history
	* lto-plugin.c (claim_file_handler): Call release_input_file only
	if file is claimed.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@220455 138bc75d-0d04-0410-961f-82ee72b054a4
  • Loading branch information
hjl committed Feb 5, 2015
1 parent 4beb22d commit 7493d34
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions lto-plugin/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2015-02-05 H.J. Lu <hongjiu.lu@intel.com>

* lto-plugin.c (claim_file_handler): Call release_input_file only
if file is claimed.

2015-01-28 H.J. Lu <hongjiu.lu@intel.com>

* lto-plugin.c (claim_file_handler): Call release_input_file only
Expand Down
6 changes: 3 additions & 3 deletions lto-plugin/lto-plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -998,6 +998,9 @@ claim_file_handler (const struct ld_plugin_input_file *file, int *claimed)

*claimed = 1;

if (release_input_file)
release_input_file (file);

goto cleanup;

err:
Expand All @@ -1007,9 +1010,6 @@ claim_file_handler (const struct ld_plugin_input_file *file, int *claimed)
if (obj.objfile)
simple_object_release_read (obj.objfile);

if (release_input_file)
release_input_file (file);

return LDPS_OK;
}

Expand Down

0 comments on commit 7493d34

Please sign in to comment.