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

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



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.


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