From: Ralf Wildenhues Date: Wed, 29 Aug 2007 21:01:20 +0000 (+0000) Subject: * libltdl/slist.c (slist_remove): When a matching item is found, X-Git-Tag: release-2-1b~78 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=208dd66070484b2c3605c505521038e5006bf359;p=thirdparty%2Flibtool.git * libltdl/slist.c (slist_remove): When a matching item is found, break out of the loop to return the first match; also fixes possible NULL dereference. --- diff --git a/ChangeLog b/ChangeLog index 2a85f67ac..265aff366 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2007-08-29 Ralf Wildenhues + * libltdl/slist.c (slist_remove): When a matching item is found, + break out of the loop to return the first match; also fixes + possible NULL dereference. + * libltdl/m4/libtool.m4 (_LT_COMPILER_PIC, _LT_LINKER_SHLIBS) (_LT_LANG_CXX_CONFIG) [ linux ]: Add support for IBM XL 8.0 C/C++ (xlc*, xlC*) and IBM XL Fortran 10.1 (xlf*) on GNU/Linux, diff --git a/libltdl/slist.c b/libltdl/slist.c index 38ef61579..c722801d6 100644 --- a/libltdl/slist.c +++ b/libltdl/slist.c @@ -1,6 +1,6 @@ /* slist.c -- generalised singly linked lists - Copyright (C) 2000, 2004 Free Software Foundation, Inc. + Copyright (C) 2000, 2004, 2007 Free Software Foundation, Inc. Written by Gary V. Vaughan, 2000 NOTE: The canonical source of this file is maintained with the @@ -101,6 +101,7 @@ slist_remove (SList **phead, SListCallback *find, void *matchdata) { stale = head->next; head->next = stale->next; + break; } } }