]> xenbits.xensource.com Git - libvirt.git/commitdiff
conf: goto error when value of max_sectors is too large
authorLuyao Huang <lhuang@redhat.com>
Fri, 12 Dec 2014 02:32:54 +0000 (10:32 +0800)
committerMartin Kletzander <mkletzan@redhat.com>
Fri, 12 Dec 2014 06:21:45 +0000 (07:21 +0100)
Output error when we try to set a too large max_sectors.
Just like queues and cmd_per_lun here.

Signed-off-by: Luyao Huang <lhuang@redhat.com>
src/conf/domain_conf.c

index ec45b8cfc51bcc7f90701024a41b7e02f4e29a81..defa44058b5bc6c9ea3746767f47ed0f2fd57f77 100644 (file)
@@ -6681,6 +6681,7 @@ virDomainControllerDefParseXML(xmlNodePtr node,
     if (max_sectors && virStrToLong_ui(max_sectors, NULL, 10, &def->max_sectors) < 0) {
         virReportError(VIR_ERR_XML_ERROR,
                        _("Malformed 'max_sectors' value %s'"), max_sectors);
+        goto error;
     }
 
     if (virDomainDeviceInfoParseXML(node, NULL, &def->info, flags) < 0)