portal.c: doh, can't just reference a single item in a list

you must iterate over it safely if you want to delete it, otherwise bad
things happen.

The test program finally works now.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>