vmalloc.c: fix double error checking