[PATCH] conf: fix not jump to cleanup when parse a host id is invalid

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 src/conf/network_conf.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c
index 3d8bf05..52fcf3d 100644
--- a/src/conf/network_conf.c
+++ b/src/conf/network_conf.c
@@ -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;
         }
     }
 
-- 
1.8.3.1

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




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]