+2010-10-15 Dave Korn <dave.korn.cygwin@gmail.com>
+
+ * plugin.c (add_input_file): Take copy of input string.
+ (add_input_library): Likewise.
+ (set_extra_library_path): Likewise.
+
2010-10-14 Dave Korn <dave.korn.cygwin@gmail.com>
Apply LD plugin patch series (part 6/6).
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;
}
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;
}
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;
}