+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
{
++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)