[Spice-devel] [spice-common][PATCH 2/2] quic_family_tmpl: Fix "FORWARD_NULL" caught by coverity

Marc-André Lureau mlureau at redhat.com
Tue Jul 15 02:04:34 PDT 2014


ack

----- Original Message -----
> Ensure the received bucket is non NULL
> ---
>  common/quic_family_tmpl.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/common/quic_family_tmpl.c b/common/quic_family_tmpl.c
> index 12ef62f..9a434e0 100644
> --- a/common/quic_family_tmpl.c
> +++ b/common/quic_family_tmpl.c
> @@ -72,6 +72,8 @@ static void FNAME(update_model)(CommonState *state,
> s_bucket * const bucket,
>                                  const BYTE curval)
>  {
>      spice_static_assert(BPC >= 1);
> +    spice_return_if_fail (bucket != NULL);
> +
>      const unsigned int bpp = BPC;
>      COUNTER * const pcounters = bucket->pcounters;
>      unsigned int i;
> --
> 1.9.3
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
> 


More information about the Spice-devel mailing list