ptrlist: reading deleted items in NEXT_PTR_LIST()

If you call DELETE_CURRENT_PTR(), then you can sometimes end up with a
__list->nr that is zero.  The FOR_EACH_PTR() macro can handle this but
the NEXT_PTR_LIST() macro returns ptr = 0xf0f0f0f0 which leads to a
segfault.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Christopher Li <sparse@chrisli.org>
1 file changed