break out of the loop to return the first match; also fixes
possible NULL dereference.
2007-08-29 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+ * 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,
/* 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
{
stale = head->next;
head->next = stale->next;
+ break;
}
}
}