qemuMigrationCookieAddCaps: Use 'g_new0' instead of VIR_ALLOC

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Peter Krempa 2020-10-02 10:09:25 +02:00
parent 83434e5acd
commit 78d330bde1

View File

@ -542,8 +542,7 @@ qemuMigrationCookieAddCaps(qemuMigrationCookiePtr mig,
qemuDomainObjPrivatePtr priv = vm->privateData;
qemuMigrationCookieCapsFree(mig->caps);
if (VIR_ALLOC(mig->caps) < 0)
return -1;
mig->caps = g_new0(qemuMigrationCookieCaps, 1);
if (priv->migrationCaps)
mig->caps->supported = virBitmapNewCopy(priv->migrationCaps);