]> git.ipfire.org Git - thirdparty/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:56:22 +0000 (08:56 +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>
(cherry picked from commit 719cd2182bf06196b26204a8cf88d28001b1d79b)

src/conf/network_conf.c

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