From: Peter Eisentraut Date: Mon, 23 Apr 2001 21:28:25 +0000 (+0000) Subject: * libltdl/ltdl.c (lt_dlexit): Quit loop if only resident modules X-Git-Tag: multi-language-merge-point~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b5c17ff299fd25a1234719006eafcf7cfeac7e7d;p=thirdparty%2Flibtool.git * libltdl/ltdl.c (lt_dlexit): Quit loop if only resident modules are left. --- diff --git a/ChangeLog b/ChangeLog index 5922796fd..0d65ed057 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2001-04-23 Peter Eisentraut + + * libltdl/ltdl.c (lt_dlexit): Quit loop if only resident modules + are left. + 2001-04-23 Gary V. Vaughan From Albert Chin-A-Young diff --git a/libltdl/ltdl.c b/libltdl/ltdl.c index 5a9ebc41e..8e8f00961 100644 --- a/libltdl/ltdl.c +++ b/libltdl/ltdl.c @@ -1384,11 +1384,14 @@ lt_dlexit () for (level = 1; handles; ++level) { lt_dlhandle cur = handles; + int saw_nonresident = 0; while (cur) { 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)) @@ -1397,6 +1400,9 @@ lt_dlexit () } } } + /* done if only resident modules are left */ + if (!saw_nonresident) + break; } /* close all loaders */