[vlc-devel] [vlc-commits] subpicture: fix leak

Thomas Guillem thomas at gllm.fr
Wed Sep 2 10:55:35 CEST 2015


On Sat, Aug 29, 2015, at 16:45, Rémi Denis-Courmont wrote:
> vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Aug 29
> 17:45:27 2015 +0300| [45e9b837dfadf004d5612f317826e92e3802fc0a] |
> committer: Rémi Denis-Courmont
> 
> subpicture: fix leak

This causes a double free with .srt.

The text segment is also freed from subpicture_Delete() via the
p_subpic->updater.pf_destroy callback.

> 
> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=45e9b837dfadf004d5612f317826e92e3802fc0a
> ---
> 
>  src/misc/subpicture.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/misc/subpicture.c b/src/misc/subpicture.c
> index 998c52e..945e4e9 100644
> --- a/src/misc/subpicture.c
> +++ b/src/misc/subpicture.c
> @@ -246,7 +246,7 @@ void subpicture_region_Delete( subpicture_region_t
> *p_region )
>      if( p_region->p_picture )
>          picture_Release( p_region->p_picture );
>  
> -    // Don't release text_segment's, they are owned by the subpicture
> itself
> +    text_segment_Delete( p_region->p_text );
>      free( p_region->fmt.p_palette );
>      free( p_region );
>  }
> 
> _______________________________________________
> vlc-commits mailing list
> vlc-commits at videolan.org
> https://mailman.videolan.org/listinfo/vlc-commits


More information about the vlc-devel mailing list