]> git.sesse.net Git - vlc/commitdiff
Fixed use of freed memory every time rtmp access is probed/used.
authorLaurent Aimar <fenrir@videolan.org>
Sat, 28 Jun 2008 21:40:12 +0000 (21:40 +0000)
committerLaurent Aimar <fenrir@videolan.org>
Sat, 28 Jun 2008 21:41:55 +0000 (21:41 +0000)
(for example, on invalid file ...)

modules/access/rtmp/access.c

index 8be1e0d27c3ce59423eba7792636e545c037fe99..e0416aebf77e1706f031a57041fed8f6edfbd767 100644 (file)
@@ -242,10 +242,11 @@ error2:
 
     net_Close( p_sys->p_thread->fd );
 error:
+    vlc_UrlClean( &p_sys->p_thread->url );
+
     vlc_object_detach( p_sys->p_thread );
     vlc_object_release( p_sys->p_thread );
 
-    vlc_UrlClean( &p_sys->p_thread->url );
     free( p_sys );
 
     return VLC_EGENERIC;
@@ -286,12 +287,12 @@ static void Close( vlc_object_t * p_this )
 
     var_Destroy( p_access, "rtmp-caching" );
 
-    vlc_object_detach( p_sys->p_thread );
-    vlc_object_release( p_sys->p_thread );
-
     vlc_UrlClean( &p_sys->p_thread->url );
     free( p_sys->p_thread->psz_application );
     free( p_sys->p_thread->psz_media );
+
+    vlc_object_detach( p_sys->p_thread );
+    vlc_object_release( p_sys->p_thread );
     free( p_sys );
 }