[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [XenPPC] [xenppc-unstable] [POWERPC][XEN] make sure put_domain() is called in case of allocate_rma() failuer
# HG changeset patch # User Jimi Xenidis <jimix@xxxxxxxxxxxxxx> # Node ID 2644e0336cc57aa2acf6009a93c57f2c1e143ff0 # Parent 82ddfe69c62efbe44289b4d80d27492ccea6b043 [POWERPC][XEN] make sure put_domain() is called in case of allocate_rma() failuer Signed-off-by: Jimi Xenidis <jimix@xxxxxxxxxxxxxx> --- xen/arch/powerpc/dom0_ops.c | 15 +++++++-------- 1 files changed, 7 insertions(+), 8 deletions(-) diff -r 82ddfe69c62e -r 2644e0336cc5 xen/arch/powerpc/dom0_ops.c --- a/xen/arch/powerpc/dom0_ops.c Tue Sep 12 06:48:32 2006 -0400 +++ b/xen/arch/powerpc/dom0_ops.c Tue Sep 12 10:53:46 2006 -0400 @@ -98,15 +98,14 @@ long arch_do_domctl(struct xen_domctl *d struct domain *d; unsigned int log = domctl->u.real_mode_area.log; + ret = -ESRCH; d = find_domain_by_id(domctl->domain); - if (d == NULL) - return -ESRCH; - - if (!cpu_rma_valid(log)) - return -EINVAL; - - ret = allocate_rma(d, log - PAGE_SHIFT); - put_domain(d); + if (d != NULL) { + ret = -EINVAL; + if (cpu_rma_valid(log)) + ret = allocate_rma(d, log - PAGE_SHIFT); + put_domain(d); + } } break; _______________________________________________ Xen-ppc-devel mailing list Xen-ppc-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-ppc-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |