Re: [PATCH] use g_queue_free_full to free the queue

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

 



Hi,

On Wed, Jan 02, 2019 at 05:41:52PM +0200, Snir Sheriber wrote:
> Signed-off-by: Snir Sheriber <ssheribe@xxxxxxxxxx>

Acked-by: Victor Toso <victortoso@xxxxxxxxxx>

> ---
>  src/channel-display-gst.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/src/channel-display-gst.c b/src/channel-display-gst.c
> index 2c07f35..bd2a9ff 100644
> --- a/src/channel-display-gst.c
> +++ b/src/channel-display-gst.c
> @@ -548,11 +548,7 @@ static void spice_gst_decoder_destroy(VideoDecoder *video_decoder)
>          g_source_remove(decoder->timer_id);
>      }
>      g_mutex_clear(&decoder->queues_mutex);
> -    SpiceGstFrame *gstframe;
> -    while ((gstframe = g_queue_pop_head(decoder->decoding_queue))) {
> -        free_gst_frame(gstframe);
> -    }
> -    g_queue_free(decoder->decoding_queue);
> +    g_queue_free_full(decoder->decoding_queue, (GDestroyNotify)free_gst_frame);
>      if (decoder->display_frame) {
>          free_gst_frame(decoder->display_frame);
>      }
> -- 
> 2.19.1
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/spice-devel

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel

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