ia64/xen-unstable

changeset 3735:4d39c79968fa

bitkeeper revision 1.1159.254.1 (4208fb40ebFKAx9nnWfHPfWIPdQ9Vw)

Bug fix for free_domain_struct().
Don't dereference a pointer after we've free'd it.
author mafetter@fleming.research
date Tue Feb 08 17:47:44 2005 +0000 (2005-02-08)
parents ea98f0bb6510
children 7406a28a87bc
files xen/common/schedule.c
line diff
     1.1 --- a/xen/common/schedule.c	Tue Feb 08 12:27:23 2005 +0000
     1.2 +++ b/xen/common/schedule.c	Tue Feb 08 17:47:44 2005 +0000
     1.3 @@ -91,11 +91,13 @@ static struct ac_timer t_timer[NR_CPUS];
     1.4  
     1.5  void free_domain_struct(struct domain *d)
     1.6  {
     1.7 -    struct exec_domain *ed;
     1.8 +    int i;
     1.9  
    1.10      SCHED_OP(free_task, d);
    1.11 -    for_each_exec_domain(d, ed)
    1.12 -        arch_free_exec_domain_struct(ed);
    1.13 +    for (i = 0; i < MAX_VIRT_CPUS; i++)
    1.14 +        if ( d->exec_domain[i] )
    1.15 +            arch_free_exec_domain_struct(d->exec_domain[i]);
    1.16 +
    1.17      arch_free_domain_struct(d);
    1.18  }
    1.19