[vlc-commits] input: fix use after free

Tristan Matthews git at videolan.org
Fri Aug 1 17:55:59 CEST 2014


vlc | branch: master | Tristan Matthews <le.businessman at gmail.com> | Fri Aug  1 11:55:11 2014 -0400| [e345ccc4ed2ed312793ff00efdd2bc572d845461] | committer: Tristan Matthews

input: fix use after free

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e345ccc4ed2ed312793ff00efdd2bc572d845461
---

 src/input/input.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/input/input.c b/src/input/input.c
index 87bbfe8..7f4693f 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -2413,7 +2413,6 @@ static int InputSourceInit( input_thread_t *p_input,
 
         if( in->p_demux == NULL )
         {
-            stream_Delete( p_stream );
             if( vlc_object_alive( p_input ) )
             {
                 msg_Err( p_input, "no suitable demux module for `%s/%s://%s'",
@@ -2424,6 +2423,7 @@ static int InputSourceInit( input_thread_t *p_input,
                                   _("The format of '%s' cannot be detected. "
                                     "Have a look at the log for details."), psz_mrl );
             }
+            stream_Delete( p_stream );
             goto error;
         }
         assert( in->p_demux->pf_demux != NULL );



More information about the vlc-commits mailing list