[PATCH] qemu: Avoid parsing empty nodeset string

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

 



The advisory nodeset from numad is parsed irrespective of
the string being empty or not. Avoid parsing an empty nodeset
string.

Signed-off-by: Nitesh Konkar <nitkon12@xxxxxxxxxxxxxxxxxx>
---
 src/qemu/qemu_process.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 85b800d..1c49fa6 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -5456,7 +5456,7 @@ qemuProcessPrepareDomain(virConnectPtr conn,
         if (virDomainDefNeedsPlacementAdvice(vm->def)) {
             nodeset = virNumaGetAutoPlacementAdvice(virDomainDefGetVcpus(vm->def),
                                                     virDomainDefGetMemoryTotal(vm->def));
-            if (!nodeset)
+            if (virStringIsEmpty(nodeset))
                 goto cleanup;
 
             VIR_DEBUG("Nodeset returned from numad: %s", nodeset);
-- 
2.9.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[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