On 11/28/2011 11:46 AM, Michal Privoznik wrote:
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.
---
  tools/virsh.c |    3 +++
  1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/tools/virsh.c b/tools/virsh.c
index 16d815c..6ed249b 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -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;
ACK

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

Reply via email to