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

Filip Roséen git at videolan.org
Sun Jun 5 16:42:40 CEST 2016


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 );
+
                          p_seekpoint->psz_name = strdup(psz_start + 5);
                      }
                      else if( !strncmp( psz_start, "time=", 5 ) )



More information about the vlc-commits mailing list