Don't continue trying to allocate memory when it's already failed.