On Mon, May 11, 2015 at 06:29:35 -0400, John Ferlan wrote: > > > On 04/30/2015 08:44 AM, Peter Krempa wrote: > > ... > > > > > - if (!(dom = virGetDomain(data->conn, vm->def->name, vm->def->uuid))) { > > - data->error = true; > > - goto cleanup; > > + > > +int > > +virDomainObjListCollect(virDomainObjListPtr domlist, > > + virConnectPtr conn, > > + virDomainObjPtr **vms, > > + size_t *nvms, > > + virDomainObjListACLFilter filter, > > + unsigned int flags) > > +{ > > + struct virDomainListData data = { NULL, 0 }; > > + > > + virObjectLock(domlist); > > + if (VIR_ALLOC_N(data.vms, virHashSize(domlist->objs)) < 0) { > > Coverity checker wasn't very happy with this especially if virHashSize > returns a negative number. False positive. virHashSize returns null only if the hash is NULL which never happens for domlist-objs. Peter
Attachment:
signature.asc
Description: Digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list