]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* libltdl/ltdl.c (find_module): Check that dir is set.
authorPeter O'Gorman <peter@pogma.com>
Thu, 13 Oct 2005 04:48:36 +0000 (04:48 +0000)
committerPeter O'Gorman <peter@pogma.com>
Thu, 13 Oct 2005 04:48:36 +0000 (04:48 +0000)
(load_deplibs): Don't free the user search paths too early.

ChangeLog
libltdl/ltdl.c

index 8610ba4d32eef9ac473afec4435a3da824ac1a06..acf66de96f8f77d5858590a0162afc014e58422b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+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-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        * tests/testsuite.at (LT_AT_AUTOMAKE): New macro.
index dd9cc715b2180ec308527ade5c10dffaa6edab5f..c27406470542ef4baf14dd4d92813176e3804536 100644 (file)
@@ -473,8 +473,8 @@ find_module (lt_dlhandle *handle, const char *dir, const char *libdir,
 
       /* 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;
       }
     }
@@ -774,8 +774,6 @@ load_deplibs (lt_dlhandle handle, char *deplibs)
        }
     }
 
-  /* restore the old search path */
-  MEMREASSIGN (user_search_path, save_search_path);
 
   if (!depcount)
     {
@@ -864,6 +862,10 @@ load_deplibs (lt_dlhandle handle, char *deplibs)
 
  cleanup:
   FREE (names);
+  /* restore the old search path */
+  if (save_search_path) {
+    MEMREASSIGN (user_search_path, save_search_path);
+  }
 #endif
 
   return errors;