From: Daniel P. Berrange Date: Mon, 16 Mar 2009 10:33:01 +0000 (+0000) Subject: Fix handling of cpumaps arg to virDomainGetVcpus RPC dispatcher X-Git-Url: http://git.et.redhat.com/?p=libvirt.git;a=commitdiff_plain;h=2d75d954f52a740470f85ceece4eb995d79968ca Fix handling of cpumaps arg to virDomainGetVcpus RPC dispatcher --- diff --git a/qemud/remote.c b/qemud/remote.c index 8eaa7d6..44a274a 100644 --- a/qemud/remote.c +++ b/qemud/remote.c @@ -1475,7 +1475,8 @@ remoteDispatchDomainGetVcpus (struct qemud_server *server ATTRIBUTE_UNUSED, /* Allocate buffers to take the results. */ if (VIR_ALLOC_N(info, args->maxinfo) < 0) goto oom; - if (VIR_ALLOC_N(cpumaps, args->maxinfo) < 0) + if (args->maplen > 0 && + VIR_ALLOC_N(cpumaps, args->maxinfo * args->maplen) < 0) goto oom; info_len = virDomainGetVcpus (dom,