511f6cd625
- Avoid crash if storage volume deletion fails - Fix multiple FD leaks - Fix bug in dispatch FD events when a callback is marked deleted - Fix parsing of storage volume owner/group/mode - Fix memory allocation for virDomainGetVcpus RPC handler - Avoid deadlock in setting vCPU count - Use correct driver name in Xen block detach
23 lines
884 B
Diff
23 lines
884 B
Diff
From: Daniel P. Berrange <berrange@redhat.com>
|
|
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,
|