summaryrefslogtreecommitdiff
path: root/libltdl/slist.c
diff options
context:
space:
mode:
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>2007-08-29 21:01:20 +0000
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>2007-08-29 21:01:20 +0000
commit208dd66070484b2c3605c505521038e5006bf359 (patch)
treeea638d149dffb611cdcaea7aaaff188e9c18b814 /libltdl/slist.c
parent1e63751c040ee99c1b9e2e438c264a14363be9c7 (diff)
downloadlibtool-208dd66070484b2c3605c505521038e5006bf359.tar.gz
* 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.
Diffstat (limited to 'libltdl/slist.c')
-rw-r--r--libltdl/slist.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libltdl/slist.c b/libltdl/slist.c
index 38ef6157..c722801d 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;
}
}
}