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

[libvirt] [PATCH] qemu: Avoid parsing empty nodeset string



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 linux vnet ibm com>
---
 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


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