]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* libltdl/ltdl.c (lt_dlexit): Fix my bogus backport of Dave
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Mon, 29 Jan 2007 21:54:10 +0000 (21:54 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Mon, 29 Jan 2007 21:54:10 +0000 (21:54 +0000)
Brolley's patch from CVS HEAD.

ChangeLog
libltdl/ltdl.c

index 67bd215ea4f8d46289e83b24727c90057ada1343..9d941fbd29457b70d261b7e851edbc3e38a3b7e3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-01-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       * libltdl/ltdl.c (lt_dlexit): Fix my bogus backport of Dave
+       Brolley's patch from CVS HEAD.
+
 2007-01-29  Samuel Thibault <samuel.thibault@ens-lyon.org>
 
        * libtool.m4 (AC_LIBTOOL_PROG_LD_SHLIBS) [ gnu ]
index 5435c31e16c08c06fc42b3a9dc8e53cb929689f5..bd88414df5384ca1591db00a7c7f25c7017e8f62 100644 (file)
@@ -2341,6 +2341,13 @@ lt_dlexit ()
              lt_dlhandle tmp = cur;
              cur = cur->next;
              if (!LT_DLIS_RESIDENT (tmp))
+               saw_nonresident = 1;
+             if (!LT_DLIS_RESIDENT (tmp) && tmp->info.ref_count <= level)
+               {
+                 if (lt_dlclose (tmp))
+                   {
+                     ++errors;
+                   }
                  /* Make sure that the handle pointed to by 'cur' still exists.
                     lt_dlclose recursively closes dependent libraries which removes
                     them from the linked list.  One of these might be the one
@@ -2353,14 +2360,6 @@ lt_dlexit ()
                      if (! tmp)
                        cur = handles;
                    }
-
-               saw_nonresident = 1;
-             if (!LT_DLIS_RESIDENT (tmp) && tmp->info.ref_count <= level)
-               {
-                 if (lt_dlclose (tmp))
-                   {
-                     ++errors;
-                   }
                }
            }
          /* done if only resident modules are left */