diff options
author | Xavier Chantry <shiningxc@gmail.com> | 2009-10-10 23:57:10 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2009-10-11 12:55:55 -0500 |
commit | 5e03941ee5fbd0cc69ac83e2dd6ad6d3e6d940cd (patch) | |
tree | ccdd635f7970dd6f1e168c15e2e9cb2609324475 /lib/libalpm | |
parent | f15c8d46166a4774028b32407cd1477990130911 (diff) | |
download | pacman-5e03941ee5fbd0cc69ac83e2dd6ad6d3e6d940cd.tar.xz |
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>
Diffstat (limited to 'lib/libalpm')
-rw-r--r-- | lib/libalpm/alpm_list.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libalpm/alpm_list.c b/lib/libalpm/alpm_list.c index 8b2c7b3e..127f72ac 100644 --- a/lib/libalpm/alpm_list.c +++ b/lib/libalpm/alpm_list.c @@ -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; |