]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
conf: error out on invalid host id
authorLuyao Huang <lhuang@redhat.com>
Thu, 26 Feb 2015 06:14:20 +0000 (14:14 +0800)
committerJán Tomko <jtomko@redhat.com>
Thu, 26 Feb 2015 07:52:43 +0000 (08:52 +0100)
https://bugzilla.redhat.com/show_bug.cgi?id=1196503

We already check whether the host id is valid or not, add a jump
to forbid invalid host id.

Signed-off-by: Luyao Huang <lhuang@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
src/conf/network_conf.c

index 3d8bf054ffbe38e3903edb59403f24a543c2ddbf..52fcf3d2aa88cfd47895f87b38a578df7fcda339 100644 (file)
@@ -717,6 +717,7 @@ virNetworkDHCPHostDefParseXML(const char *networkName,
             virReportError(VIR_ERR_XML_ERROR,
                            _("Invalid character '%c' in id '%s' of network '%s'"),
                            *cp, id, networkName);
+            goto cleanup;
         }
     }