* correctly. It does not have to be ABI-stable, as
* the cache will be discarded & repopulated if the
* timestamp on the libvirtd binary changes.
+ *
+ * And don't forget to update virQEMUCapsNewCopy.
*/
struct _virQEMUCaps {
virObject object;
ret->usedQMP = qemuCaps->usedQMP;
+ if (VIR_STRDUP(ret->binary, qemuCaps->binary) < 0)
+ goto error;
+
+ ret->ctime = qemuCaps->ctime;
+
virBitmapCopy(ret->flags, qemuCaps->flags);
ret->version = qemuCaps->version;
ret->machineTypes[i].maxCpus = qemuCaps->machineTypes[i].maxCpus;
}
+ if (VIR_ALLOC_N(ret->gicCapabilities, qemuCaps->ngicCapabilities) < 0)
+ goto error;
+ ret->ngicCapabilities = qemuCaps->ngicCapabilities;
+ for (i = 0; i < qemuCaps->ngicCapabilities; i++)
+ ret->gicCapabilities[i] = qemuCaps->gicCapabilities[i];
+
return ret;
error: