]> git.sesse.net Git - vlc/commitdiff
ts: double free (CID 245)
authorDerk-Jan Hartman <hartman@videolan.org>
Thu, 9 Oct 2008 16:00:29 +0000 (18:00 +0200)
committerDerk-Jan Hartman <hartman@videolan.org>
Thu, 9 Oct 2008 16:00:29 +0000 (18:00 +0200)
modules/demux/ts.c

index 35499134efabfe4fe2090124a4903a9021d09393..c0c12e55f95ad487770d95ec59390db6e3224253 100644 (file)
@@ -857,7 +857,6 @@ static void Close( vlc_object_t *p_this )
     if( p_sys->b_udp_out )
     {
         net_Close( p_sys->fd );
-        free( p_sys->buffer );
     }
     vlc_mutex_lock( &p_sys->csa_lock );
     if( p_sys->csa )
@@ -889,10 +888,9 @@ static void Close( vlc_object_t *p_this )
             fclose( p_sys->p_file );
             p_sys->p_file = NULL;
         }
-
-        free( p_sys->buffer );
     }
 
+    free( p_sys->buffer );
     free( p_sys->psz_file );
     p_sys->psz_file = NULL;