]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: Fix return check on virHashAddEntry call
authorJohn Ferlan <jferlan@redhat.com>
Fri, 15 Sep 2017 11:36:55 +0000 (07:36 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Fri, 15 Sep 2017 12:34:57 +0000 (08:34 -0400)
Luckily it only returns 0 or -1

src/qemu/qemu_conf.c

index ab5f7cc591fc80789758d335c0bae19b38c7faf6..68c00c1e837f1865248e019f2ab3ba4891e02e02 100644 (file)
@@ -1300,7 +1300,7 @@ qemuSharedDeviceEntryInsert(virQEMUDriverPtr driver,
 
         entry->ref = 1;
 
-        if (virHashAddEntry(driver->sharedDevices, key, entry))
+        if (virHashAddEntry(driver->sharedDevices, key, entry) < 0)
             goto error;
     }