diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libalpm/alpm_list.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/libalpm/alpm_list.c b/lib/libalpm/alpm_list.c index 87567402..98895032 100644 --- a/lib/libalpm/alpm_list.c +++ b/lib/libalpm/alpm_list.c @@ -302,6 +302,10 @@ alpm_list_t SYMEXPORT *alpm_list_remove(alpm_list_t *haystack, const void *needl *data = NULL; } + if(needle == NULL) { + return(haystack); + } + while(i) { if(i->data == NULL) { continue; |