From b5c17ff299fd25a1234719006eafcf7cfeac7e7d Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Mon, 23 Apr 2001 21:28:25 +0000 Subject: [PATCH] * libltdl/ltdl.c (lt_dlexit): Quit loop if only resident modules are left. --- ChangeLog | 5 +++++ libltdl/ltdl.c | 6 ++++++ 2 files changed, 11 insertions(+) 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 */ -- 2.47.2