2001-08-13 Gary V. Vaughan <gary@gnu.org>
+ * libltdl/ltdl.c (find_file_callback): Fix a multiple free()
+ bug.
+ (tryall_dlopen_module): Remove some unused variables.
+
* libltdl/ltdl.c (lt_dlinsertsearchdir): Calculate the address
of the end of user_search_path correctly.
-
+
* libltdl/ltdl.c (rpl_argz_stringify): New fallback implementation.
* ltdl.m4 (AC_LTDL_FUNC_ARGZ): Test for argz_stringify in libc.
* libltdl/ltdl.c (lt_argz_insertinorder): Renamed from
if (!filename)
return 1;
- sprintf (filename, "%.*s/%s", dirname_len, dirname, dlname);
+ sprintf (filename, "%.*s/%s", (int) dirname_len, dirname, dlname);
/* Now that we have combined DIRNAME and MODULENAME, if there is
also a PREFIX to contend with, simply recurse with the arguments
const char *old_name;
int installed;
{
- int error;
- char *filename;
-
/* Try to open the old library first; if it was dlpreopened,
we want the preopened version of it, even if a dlopenable
module is available. */
/* Try to open the dynamic library. */
if (dlname)
{
- size_t len;
-
/* try to open the installed module */
if (installed && libdir)
{
{
char *dirend = strrchr (filename, '/');
- LT_DLFREE (*pdir);
- *pdir = filename;
- filename = 0;
-
if (dirend > filename)
*dirend = LT_EOS_CHAR;
- is_done = 1;
+ LT_DLFREE (*pdir);
+ *pdir = lt_estrdup (filename);
+ is_done = (*pdir == 0) ? -1 : 1;
}
return is_done;