From: Ralf Wildenhues Date: Mon, 29 Jan 2007 21:54:10 +0000 (+0000) Subject: * libltdl/ltdl.c (lt_dlexit): Fix my bogus backport of Dave X-Git-Tag: release-1-5-23b~6 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=a4158dd68d12d8672a8f3259ee8447cdb9d2d0a0;p=thirdparty%2Flibtool.git * libltdl/ltdl.c (lt_dlexit): Fix my bogus backport of Dave Brolley's patch from CVS HEAD. --- diff --git a/ChangeLog b/ChangeLog index 67bd215ea..9d941fbd2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-01-29 Ralf Wildenhues + + * libltdl/ltdl.c (lt_dlexit): Fix my bogus backport of Dave + Brolley's patch from CVS HEAD. + 2007-01-29 Samuel Thibault * libtool.m4 (AC_LIBTOOL_PROG_LD_SHLIBS) [ gnu ] diff --git a/libltdl/ltdl.c b/libltdl/ltdl.c index 5435c31e1..bd88414df 100644 --- a/libltdl/ltdl.c +++ b/libltdl/ltdl.c @@ -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 */