Backport of memory leak patch

Preemption causes memory leak in the scheduler.  This implements patch
https://github.com/SchedMD/slurm/commit/bcb50fa27331227da0f721b0971d3cd7929f2915.patch