提交 fa7d0cc1 编写于 作者: J John Ferlan

cpu_x86: Handle error in x86DataToCPU when calling x86DataAdd

Commit 9c9620af called x86DataAdd without checking for an error,
so add the error checking.

Found by Coverity
Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
上级 5acb4eed
......@@ -822,7 +822,8 @@ x86DataToCPU(const virCPUx86Data *data,
for (blocker = hvModel->blockers; *blocker; blocker++) {
if ((feature = x86FeatureFind(map, *blocker)) &&
!x86DataIsSubset(&copy, &feature->data))
x86DataAdd(&modelData, &feature->data);
if (x86DataAdd(&modelData, &feature->data) < 0)
goto error;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册