]> git.sesse.net Git - vlc/blobdiff - modules/access/rtmp/access.c
Rework error handling, with a fixed deallocation block at the end of Open().
[vlc] / modules / access / rtmp / access.c
index 9d8130bf0b4214fe67a9bf6a703e9a9a1cfbfe6b..c7f5ed7bacefe949ef67ed37c178351b676b1be4 100644 (file)
@@ -106,7 +106,7 @@ static int Open( vlc_object_t *p_this )
     vlc_object_attach( p_sys->p_thread, p_access );
 
     /* Parse URI - remove spaces */
-    p = psz = strdup( p_access->psz_path );
+    p = psz = strdup( p_access->psz_location );
     while( (p = strchr( p, ' ' )) != NULL )
         *p = '+';
     vlc_UrlParse( &p_sys->p_thread->url, psz, 0 );
@@ -270,7 +270,6 @@ error2:
 error:
     vlc_UrlClean( &p_sys->p_thread->url );
 
-    vlc_object_detach( p_sys->p_thread );
     vlc_object_release( p_sys->p_thread );
 
     free( p_sys );
@@ -315,7 +314,6 @@ static void Close( vlc_object_t * p_this )
     free( p_sys->p_thread->psz_swf_url );
     free( p_sys->p_thread->psz_page_url );
 
-    vlc_object_detach( p_sys->p_thread );
     vlc_object_release( p_sys->p_thread );
     free( p_sys );
 }