summaryrefslogtreecommitdiff
path: root/ld/plugin.c
diff options
context:
space:
mode:
Diffstat (limited to 'ld/plugin.c')
-rw-r--r--ld/plugin.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/ld/plugin.c b/ld/plugin.c
index b484bd045a..0c88ef8bea 100644
--- a/ld/plugin.c
+++ b/ld/plugin.c
@@ -433,7 +433,8 @@ static enum ld_plugin_status
add_input_file (const char *pathname)
{
ASSERT (called_plugin);
- if (!lang_add_input_file (pathname, lang_input_file_is_file_enum, NULL))
+ if (!lang_add_input_file (xstrdup (pathname), lang_input_file_is_file_enum,
+ NULL))
return LDPS_ERR;
return LDPS_OK;
}
@@ -443,7 +444,8 @@ static enum ld_plugin_status
add_input_library (const char *pathname)
{
ASSERT (called_plugin);
- if (!lang_add_input_file (pathname, lang_input_file_is_l_enum, NULL))
+ if (!lang_add_input_file (xstrdup (pathname), lang_input_file_is_l_enum,
+ NULL))
return LDPS_ERR;
return LDPS_OK;
}
@@ -454,7 +456,7 @@ static enum ld_plugin_status
set_extra_library_path (const char *path)
{
ASSERT (called_plugin);
- ldfile_add_library_path (path, FALSE);
+ ldfile_add_library_path (xstrdup (path), FALSE);
return LDPS_OK;
}