[libvirt] [PATCH] Check for errors when parsing bridge interface XML

Eric Blake eblake at redhat.com
Fri Jun 15 17:26:17 UTC 2012


On 06/15/2012 11:02 AM, Jim Fehlig wrote:

> Subject: [PATCH] Check for errors when parsing bridge interface XML
> 
> The return status of virInterfaceDefParseBridge() was not being
> checked, potentially resulting in the creation of a broken
> interface.
> ---
>  src/conf/interface_conf.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/conf/interface_conf.c b/src/conf/interface_conf.c
> index 5601d3b..0aeb1e2 100644
> --- a/src/conf/interface_conf.c
> +++ b/src/conf/interface_conf.c
> @@ -769,7 +769,8 @@ virInterfaceDefParseXML(xmlXPathContextPtr ctxt, int parentIfType) {
>              }
>              def->data.bridge.delay = virXMLPropString(bridge, "delay");
>              ctxt->node = bridge;
> -            virInterfaceDefParseBridge(def, ctxt);
> +            if (virInterfaceDefParseBridge(def, ctxt) < 0)
> +                goto error;

ACK.

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120615/0c9dc42f/attachment-0001.sig>


More information about the libvir-list mailing list