Signed-off-by: Jiri Denemark <jdene...@redhat.com>
---

Notes:
    Version 2:
    - no change

 src/cpu/cpu_x86.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c
index 904b59c..d0e1a1a 100644
--- a/src/cpu/cpu_x86.c
+++ b/src/cpu/cpu_x86.c
@@ -2653,8 +2653,11 @@ x86HasFeature(const virCPUData *data,
         return -1;
 
     if (!(feature = x86FeatureFind(map, name)) &&
-        !(feature = x86FeatureFindInternal(name)))
+        !(feature = x86FeatureFindInternal(name))) {
+        virReportError(VIR_ERR_INTERNAL_ERROR,
+                       _("unknown CPU feature %s"), name);
         goto cleanup;
+    }
 
     ret = x86DataIsSubset(&data->data.x86, &feature->data) ? 1 : 0;
 
-- 
2.10.0

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

Reply via email to