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
1 changed files with 1 additions and 0 deletions
|
@ -309,6 +309,7 @@ alpm_list_t SYMEXPORT *alpm_list_remove(alpm_list_t *haystack, const void *needl
|
||||||
|
|
||||||
while(i) {
|
while(i) {
|
||||||
if(i->data == NULL) {
|
if(i->data == NULL) {
|
||||||
|
i = i->next;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
tmp = i->next;
|
tmp = i->next;
|
||||||
|
|
Loading…
Add table
Reference in a new issue