Fix salloc/sbatch -B segfault.

Bug 1289