[libvirt] [PATCH 2/2] xenParseXM: don't dereference NULL pointer when script is empty

Michal Privoznik mprivozn at redhat.com
Thu Oct 6 09:56:29 UTC 2011


On 06.10.2011 11:16, Guido Günther wrote:
> O.k. to apply?
>  -- Guido
> 
> ---
>  src/xenxs/xen_xm.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/src/xenxs/xen_xm.c b/src/xenxs/xen_xm.c
> index d057043..30188e2 100644
> --- a/src/xenxs/xen_xm.c
> +++ b/src/xenxs/xen_xm.c
> @@ -697,8 +697,8 @@ xenParseXM(virConfPtr conf, int xendConfigVersion,
>                  }
>              }
>  
> -            if (bridge[0] || STREQ(script, "vif-bridge") ||
> -                STREQ(script, "vif-vnic")) {
> +            if (bridge[0] || (script && (STREQ(script, "vif-bridge") ||

I'd rather use STREQ_NULLABLE here.




More information about the libvir-list mailing list