We were checking the output pointer for NULL rather than checking the
dereferenced value for NULL. So the case where no processors were
returned would not have returned an error as expected.
---
src/hyperv/hyperv_driver.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/hyperv/hyperv_driver.c b/src/hyperv/hyperv_driver.c
index f80433693e..1031076a28 100644
--- a/src/hyperv/hyperv_driver.c
+++ b/src/hyperv/hyperv_driver.c
@@ -69,7 +69,7 @@ hypervGetProcessorsByName(hypervPrivate *priv, const char
*name,
if (hypervGetWmiClass(Win32_Processor, processorList) < 0)
return -1;
- if (!processorList) {
+ if (!*processorList) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Could not look up processor(s) on '%1$s'"),
name);
--
2.54.0