mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
Fix handling of cpumaps arg to virDomainGetVcpus RPC dispatcher
This commit is contained in:
parent
2567fac4a7
commit
24a149cfa2
@ -1,3 +1,8 @@
|
|||||||
|
Mon Mar 16 10:30:00 GMT 2009 Daniel P. Berrange <berrange@redhat.com>
|
||||||
|
|
||||||
|
* qemud/remote.c: Don't allocate cpumaps arg if maplength is
|
||||||
|
0, and fix size of cpumaps allocation
|
||||||
|
|
||||||
Mon Mar 16 10:30:00 GMT 2009 Daniel P. Berrange <berrange@redhat.com>
|
Mon Mar 16 10:30:00 GMT 2009 Daniel P. Berrange <berrange@redhat.com>
|
||||||
|
|
||||||
* src/storage_driver.c: Don't free storage volume in error
|
* src/storage_driver.c: Don't free storage volume in error
|
||||||
|
@ -1475,7 +1475,8 @@ remoteDispatchDomainGetVcpus (struct qemud_server *server ATTRIBUTE_UNUSED,
|
|||||||
/* Allocate buffers to take the results. */
|
/* Allocate buffers to take the results. */
|
||||||
if (VIR_ALLOC_N(info, args->maxinfo) < 0)
|
if (VIR_ALLOC_N(info, args->maxinfo) < 0)
|
||||||
goto oom;
|
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;
|
goto oom;
|
||||||
|
|
||||||
info_len = virDomainGetVcpus (dom,
|
info_len = virDomainGetVcpus (dom,
|
||||||
|
Loading…
Reference in New Issue
Block a user