]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* libltdl/slist.c (slist_remove): When a matching item is found,
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Wed, 29 Aug 2007 21:01:20 +0000 (21:01 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Wed, 29 Aug 2007 21:01:20 +0000 (21:01 +0000)
break out of the loop to return the first match; also fixes
possible NULL dereference.

ChangeLog
libltdl/slist.c

index 2a85f67ac9b11e0be33d557eaf1b4bb9db6c6c35..265aff366cb998d46f374162543c5ee058c7c707 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 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,
index 38ef615795ad934650b736923c5747f74feb7009..c722801d6a372b689fe358707a420affec4d4e0d 100644 (file)
@@ -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;
            }
        }
     }