OSDN Git Service

2007-01-24 Dave Brolley <brolley@redhat.com>
authorbrolley <brolley>
Wed, 24 Jan 2007 21:36:13 +0000 (21:36 +0000)
committerbrolley <brolley>
Wed, 24 Jan 2007 21:36:13 +0000 (21:36 +0000)
        * libltdl/ltdl.c (lt_dlexit): Make sure that 'cur' is not NULL before
        checking that it is still in the list.

sid/component/cfgroot/ChangeLog
sid/component/cfgroot/libltdl/ltdl.c

index 801d5db..46d5923 100644 (file)
@@ -1,3 +1,8 @@
+2007-01-24  Dave Brolley  <brolley@redhat.com>
+
+       * libltdl/ltdl.c (lt_dlexit): Make sure that 'cur' is not NULL before
+       checking that it is still in the list.
+
 2007-01-17  Dave Brolley  <brolley@redhat.com>
 
        * libltdl/ltdl.c (lt_dlexit): After each call to lt_dlclose, make sure
index 3ca7eb9..0d98c60 100644 (file)
@@ -2329,16 +2329,19 @@ lt_dlexit ()
                    {
                      ++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
+                    pointed to by 'cur'.  */
+                 if (cur)
+                   {
+                     for (tmp = handles; tmp; tmp = tmp->next)
+                       if (tmp == cur)
+                         break;
+                     if (! tmp)
+                       cur = handles;
+                   }
                }
-             /* 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
-                pointed to by 'cur'.  */
-             for (tmp = handles; tmp; tmp = tmp->next)
-               if (tmp == cur)
-                 break;
-             if (! tmp)
-               cur = handles;
            }
          /* done if only resident modules are left */
          if (!saw_nonresident)