[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-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 2e6c10dc7c0ba804665c6e13db8dbf7efe66f8cc # Parent 13e406c85c8b113a83c337ce9caaa8dba19b1296 [POWERPC][XEN] make sure put_domain() is called in case of allocate_rma() failuer Signed-off-by: Jimi Xenidis <jimix@xxxxxxxxxxxxxx> Signed-off-by: Hollis Blanchard <hollisb@xxxxxxxxxx> --- xen/arch/powerpc/dom0_ops.c | 15 +++++++-------- 1 files changed, 7 insertions(+), 8 deletions(-) diff -r 13e406c85c8b -r 2e6c10dc7c0b 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-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |