It is only in the error case that we want to clean up the new pool's scheduler data; in the success case it's rather the old scheduler's data which needs cleaning up.
Reported-by: René Winther Højgaard <[email protected]> Signed-off-by: Jan Beulich <[email protected]> Reviewed-by: Juergen Gross <[email protected]> --- a/xen/common/sched/core.c +++ b/xen/common/sched/core.c @@ -810,7 +810,7 @@ int sched_move_domain(struct domain *d, for ( unit = old_units; unit; ) { if ( unit->priv ) - sched_free_udata(c->sched, unit->priv); + sched_free_udata(ret ? c->sched : old_ops, unit->priv); old_unit = unit; unit = unit->next_in_list; xfree(old_unit);
