提交 2d0fc93f 编写于 作者: M Michal Privoznik

virsh: Don't traverse childless nodes in vshNodeIsSuperset

If both nodes do not have any children, we pass zero to
virBitmapAlloc which returns NULL. In turn we report OOM error
and return false (meaning nodes are different). This is not true.
上级 d360795d
......@@ -11556,6 +11556,9 @@ vshNodeIsSuperset(xmlNodePtr n1, xmlNodePtr n2)
if (n1_child_size < n2_child_size)
return false;
if (n1_child_size == 0 && n2_child_size == 0)
return true;
if (!(bitmap = virBitmapAlloc(n1_child_size))) {
virReportOOMError();
return false;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册