summaryrefslogtreecommitdiff
path: root/lto-plugin
diff options
context:
space:
mode:
authorH.J. Lu <hongjiu.lu@intel.com>2015-02-05 16:40:44 +0000
committerH.J. Lu <hjl@gcc.gnu.org>2015-02-05 08:40:44 -0800
commit06fa4f005f4432d90148d37bcce2752dd922e947 (patch)
tree5dce5f91258762fddb0f2c57412f3bbd07ec92b9 /lto-plugin
parentc7d22ee76f9231727d5e8c38f4f363b6cc7382ff (diff)
Call release_input_file only if file is claimed
* lto-plugin.c (claim_file_handler): Call release_input_file only if file is claimed. From-SVN: r220455
Diffstat (limited to 'lto-plugin')
-rw-r--r--lto-plugin/ChangeLog5
-rw-r--r--lto-plugin/lto-plugin.c6
2 files changed, 8 insertions, 3 deletions
diff --git a/lto-plugin/ChangeLog b/lto-plugin/ChangeLog
index 81752e73716..510e7385884 100644
--- a/lto-plugin/ChangeLog
+++ b/lto-plugin/ChangeLog
@@ -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
diff --git a/lto-plugin/lto-plugin.c b/lto-plugin/lto-plugin.c
index add83f2c5c5..e25bbf9c44e 100644
--- a/lto-plugin/lto-plugin.c
+++ b/lto-plugin/lto-plugin.c
@@ -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:
@@ -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;
}