+2005-10-13 Peter O'Gorman <peter@pogma.com>
+
+ * libltdl/ltdl.c (find_module): Check that dir is set.
+ (load_deplibs): Don't free the user search paths too early.
+
2005-10-10 Gary V. Vaughan <gary@gnu.org>
* ltdl.m4 (AC_LTDL_ENABLE_INSTALL): Remove bogus extra
/* maybe it was moved to another directory */
{
- if (tryall_dlopen_module (handle,
- (const char *) 0, dir, dlname) == 0)
+ if (dir && (tryall_dlopen_module (handle,
+ (const char *) 0, dir, dlname) == 0))
return 0;
}
}
}
}
- /* restore the old search path */
- LT_DLFREE (user_search_path);
- user_search_path = save_search_path;
-
- LT_DLMUTEX_UNLOCK ();
-
if (!depcount)
{
errors = 0;
cleanup:
LT_DLFREE (names);
+ /* restore the old search path */
+ if (user_search_path) {
+ LT_DLFREE (user_search_path);
+ user_search_path = save_search_path;
+ }
+ LT_DLMUTEX_UNLOCK ();
+
#endif
return errors;