Re: [PATCH] dcc: remove possible dandling pointers

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

 



On Tue, 2015-11-24 at 16:17 +0000, Frediano Ziglio wrote:
> Set pointers to NULL after releasing encoders.
> This to make sure no further access will occurs.
> 
It is not a harm,

Acked-by: Pavel Grunt <pgrunt@xxxxxxxxxx>

> Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
> ---
>  server/dcc-encoders.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/server/dcc-encoders.c b/server/dcc-encoders.c
> index 1eaa604..a373412 100644
> --- a/server/dcc-encoders.c
> +++ b/server/dcc-encoders.c
> @@ -409,12 +409,17 @@ void dcc_encoders_init(DisplayChannelClient *dcc)
>  void dcc_encoders_free(DisplayChannelClient *dcc)
>  {
>      quic_destroy(dcc->quic);
> +    dcc->quic = NULL;
>      lz_destroy(dcc->lz);
> +    dcc->lz = NULL;
>      jpeg_encoder_destroy(dcc->jpeg);
> +    dcc->jpeg = NULL;
>  #ifdef USE_LZ4
>      lz4_encoder_destroy(dcc->lz4);
> +    dcc->lz4 = NULL;
>  #endif
>      zlib_encoder_destroy(dcc->zlib);
> +    dcc->zlib = NULL;
>  }
>  
>  static void marshaller_compress_buf_free(uint8_t *data, void *opaque)
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]