fix NULL pointer dereference in __vm_enough_memory()