On 09/11/2014 06:05 PM, John Ferlan wrote: > Coverity notes that after we VIR_ALLOC_N(params, nparams) a failed call to > virDomainGetCPUStats could result in nparams being set to -1. In that case, > the subsequent virTypedParamsFree in cleanup will pass -1 which isn't good. > > Use the returned value as the number of stats to display in the loop as > it will be the value reported from the hypervisor and may be less than > nparams which is OK > > Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx> > --- > tools/virsh-domain.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) ACK -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list