--- parser3/src/lib/ltdl/lt_dlloader.c 2012/06/09 13:07:11 1.1 +++ parser3/src/lib/ltdl/lt_dlloader.c 2026/09/27 13:14:20 1.2 @@ -1,6 +1,7 @@ /* lt_dlloader.c -- dynamic library loader interface - Copyright (C) 2004, 2007, 2008 Free Software Foundation, Inc. + Copyright (C) 2004, 2007-2008, 2011-2019, 2021-2024 Free Software + Foundation, Inc. Written by Gary V. Vaughan, 2004 NOTE: The canonical source of this file is maintained with the @@ -22,10 +23,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICU GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public -License along with GNU Libltdl; see the file COPYING.LIB. If not, a -copy can be downloaded from http://www.gnu.org/licenses/lgpl.html, -or obtained by writing to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +License along with GNU Libltdl. If not, see . */ #include "lt__private.h" @@ -52,7 +50,7 @@ loader_callback (SList *item, void *user assert (vtable); - return streq (vtable->name, name) ? (void *) item : NULL; + return STREQ (vtable->name, name) ? (void *) item : NULL; } @@ -165,8 +163,12 @@ lt_dlloader_remove (const char *name) return 0; } - /* Fail if there are any open modules which use this loader. */ + /* Fail if there are any open modules that use this loader. */ iface = lt_dlinterface_register (id_string, NULL); + if (!iface) + /* No memory, error is already set. */ + return 0; + while ((handle = lt_dlhandle_iterate (iface, handle))) { lt_dlhandle cur = handle;