[PATCH 18/20] qemuMigrationCookieAddCaps: Use 'g_new0' instead of VIR_ALLOC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/qemu/qemu_migration_cookie.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/qemu/qemu_migration_cookie.c b/src/qemu/qemu_migration_cookie.c
index a1ef3d2b12..93d91b8a1c 100644
--- a/src/qemu/qemu_migration_cookie.c
+++ b/src/qemu/qemu_migration_cookie.c
@@ -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);
-- 
2.26.2




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux