]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
* src/xml.c: patch from Beth Kon to fix a problem when the
authorDaniel Veillard <veillard@redhat.com>
Mon, 5 Nov 2007 10:14:42 +0000 (10:14 +0000)
committerDaniel Veillard <veillard@redhat.com>
Mon, 5 Nov 2007 10:14:42 +0000 (10:14 +0000)
  cpuset parameter for numa uses cpu maxcpu-1
Daniel

ChangeLog
src/xml.c

index 9543602559c0f49d3bda5cd09ae233e978985c21..4d74a78da671183aeb403cf88519a969a789b5ec 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Mon Nov  5 11:11:45 CET 2007 Daniel Veillard <veillard@redhat.com>
+
+       * src/xml.c: patch from Beth Kon to fix a problem when the
+         cpuset parameter for numa uses cpu maxcpu-1
+
 Thu Nov  1 14:32:07 CET 2007 Daniel Veillard <veillard@redhat.com>
 
        * src/xm_internal.c: patches from Masayuki Sunou to fix a problem
index 4eca53313e5c7cd9b84996a4e75b84ef46666aae..f2c0ff027c45a989be87fb141a1b32a886b7723c 100644 (file)
--- a/src/xml.c
+++ b/src/xml.c
@@ -126,7 +126,7 @@ parseCpuNumber(const char **str, int maxcpu)
 
     while ((*cur >= '0') && (*cur <= '9')) {
         ret = ret * 10 + (*cur - '0');
-        if (ret > maxcpu)
+        if (ret >= maxcpu)
             return (-1);
         cur++;
     }
@@ -1647,6 +1647,8 @@ virDomainParseXMLDesc(virConnectPtr conn, const char *xmldesc, char **name,
                     }
                 }
                 free(cpuset);
+                if (res < 0) 
+                    goto error;
             } else {
                 virXMLError(conn, VIR_ERR_NO_MEMORY, xmldesc, 0);
             }