ia64/xen-unstable

changeset 8830:b9a76893a1ee

[IA64] Fixed arch_domain_create

This patch fixed the process when xenheap shortage occurred
in arch_domain_create().

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
author awilliam@xenbuild.aw
date Fri Feb 17 14:34:17 2006 -0700 (2006-02-17)
parents c4d21a4d5b9a
children 2ff0ade58aab
files xen/arch/ia64/xen/domain.c
line diff
     1.1 --- a/xen/arch/ia64/xen/domain.c	Wed Feb 15 21:33:52 2006 -0700
     1.2 +++ b/xen/arch/ia64/xen/domain.c	Fri Feb 17 14:34:17 2006 -0700
     1.3 @@ -251,9 +251,12 @@ int arch_domain_create(struct domain *d)
     1.4  	return 0;
     1.5  
     1.6  fail_nomem:
     1.7 -	free_xenheap_page(d->shared_info);
     1.8 -	xfree(d->arch.mm);
     1.9 -	pgd_free(d->arch.mm->pgd);
    1.10 +	if (d->arch.mm->pgd != NULL)
    1.11 +	    pgd_free(d->arch.mm->pgd);
    1.12 +	if (d->arch.mm != NULL)
    1.13 +	    xfree(d->arch.mm);
    1.14 +	if (d->shared_info != NULL)
    1.15 +	    free_xenheap_page(d->shared_info);
    1.16  	return -ENOMEM;
    1.17  }
    1.18