mirror of
https://github.com/moparisthebest/pacman
synced 2024-08-13 17:03:46 -04:00
alpm_list : fix a bug in alpm_list_remove
A NULL list element triggered an infinite loop. Not cool :) Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
f15c8d4616
commit
5e03941ee5
@ -309,6 +309,7 @@ alpm_list_t SYMEXPORT *alpm_list_remove(alpm_list_t *haystack, const void *needl
|
||||
|
||||
while(i) {
|
||||
if(i->data == NULL) {
|
||||
i = i->next;
|
||||
continue;
|
||||
}
|
||||
tmp = i->next;
|
||||
|
Loading…
Reference in New Issue
Block a user