[vlc-devel] [PATCH] wl_shm: Fix double free at ResetPictures

Marvin Scholz epirat07 at gmail.com
Thu Apr 26 22:01:39 CEST 2018


Good evening,
how is this different from the patch you sent earlier today?
It looks identical to me.

On 25 Apr 2018, at 19:15, casian at candrei.ro wrote:

> Do not call buffer_release_cb from PictureDetach, since it will cause
> picture_Release to be called twice for the same picture.
> ---
>  modules/video_output/wayland/shm.c | 6 ------
>  1 file changed, 6 deletions(-)
>
> diff --git a/modules/video_output/wayland/shm.c 
> b/modules/video_output/wayland/shm.c
> index 08ad5022f9..b5124a7ddc 100644
> --- a/modules/video_output/wayland/shm.c
> +++ b/modules/video_output/wayland/shm.c
> @@ -91,12 +91,6 @@ static const struct wl_buffer_listener buffer_cbs =
>  static void PictureDetach(void *data, picture_t *pic)
>  {
>      struct wl_buffer *buf = (struct wl_buffer *)pic->p_sys;
> -
> -    /* Detach the buffer if it is attached */
> -    pic = wl_buffer_get_user_data(buf);
> -    if (pic != NULL)
> -        buffer_release_cb(pic, buf);
> -
>      wl_buffer_destroy(buf);
>      (void) data;
>  }
> -- 
> 2.17.0
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list