]> 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:50 +0000 (04:48 +0000)
committerPeter O'Gorman <peter@pogma.com>
Thu, 13 Oct 2005 04:48:50 +0000 (04:48 +0000)
(load_deplibs): Don't free the user search paths too early.

ChangeLog
libltdl/ltdl.c

index 41c9a402fb698a6be63c0155cf075a99953d2659..71082b3ea7c3a0d993dbe7fbd6efe455778790b6 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-10  Gary V. Vaughan  <gary@gnu.org>
 
        * ltdl.m4 (AC_LTDL_ENABLE_INSTALL): Remove bogus extra
index bc27b3656bf49951b4affdfcb9aa447bb289cb4e..3da37c85c64dfb186ab45adc4831bbb9fe2851d3 100644 (file)
@@ -2553,8 +2553,8 @@ find_module (handle, dir, libdir, dlname, old_name, installed)
 
       /* 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;
       }
     }
@@ -2881,12 +2881,6 @@ load_deplibs (handle, deplibs)
        }
     }
 
-  /* restore the old search path */
-  LT_DLFREE (user_search_path);
-  user_search_path = save_search_path;
-
-  LT_DLMUTEX_UNLOCK ();
-
   if (!depcount)
     {
       errors = 0;
@@ -2973,6 +2967,13 @@ load_deplibs (handle, deplibs)
 
  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;