[vlc-devel] [vlc-commits] core/input: fix potential memory-leak during bookmark parsing

Tristan Matthews tmatth at videolan.org
Sun Jun 5 16:48:40 CEST 2016


Hi,

On Sun, Jun 5, 2016 at 4:42 PM, Filip Roséen <git at videolan.org> wrote:

> vlc | branch: master | Filip Roséen <filip at videolabs.io> | Sun Jun  5
> 16:02:16 2016 +0200| [ec046003a490bbf423fdae74bdb3fee5b5aea581] |
> committer: Thomas Guillem
>
> core/input: fix potential memory-leak during bookmark parsing
>
> Signed-off-by: Thomas Guillem <thomas at gllm.fr>
>
> >
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ec046003a490bbf423fdae74bdb3fee5b5aea581
> ---
>
>  src/input/input.c |    3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/src/input/input.c b/src/input/input.c
> index afd40d0..5025b30 100644
> --- a/src/input/input.c
> +++ b/src/input/input.c
> @@ -428,6 +428,9 @@ static input_thread_t *Create( vlc_object_t *p_parent,
> input_item_t *p_item,
>                       *psz_end = 0;
>                       if( !strncmp( psz_start, "name=", 5 ) )
>                       {
> +                         if( p_seekpoint->psz_name )
> +                             free( p_seekpoint->psz_name );
>

No need for the if, you can free unconditionally.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20160605/f332b4d4/attachment.html>


More information about the vlc-devel mailing list