]> git.sesse.net Git - vlc/commitdiff
telnet: Fix crash when the telnet port cannot be bound
authorAurelien Nephtali <aurelien sitadelle.com>
Sat, 23 Aug 2008 22:08:45 +0000 (00:08 +0200)
committerDerk-Jan Hartman <hartman@videolan.org>
Sat, 23 Aug 2008 22:08:45 +0000 (00:08 +0200)
Fixes #1902

Signed-off-by: Derk-Jan Hartman <hartman@videolan.org>
modules/control/telnet.c

index 4efdfc9b43012bdfbd2c083befecad4ac34f876a..0be991065253e7be341d274149aeb8381cb20749 100644 (file)
@@ -195,14 +195,14 @@ static int Open( vlc_object_t *p_this )
     p_intf->p_sys = malloc( sizeof( intf_sys_t ) );
     if( !p_intf->p_sys )
     {
-        vlm_Delete( p_intf->p_sys->mediatheque );
+        vlm_Delete( mediatheque );
         vlc_UrlClean( &url );
         return VLC_ENOMEM;
     }
     if( ( p_intf->p_sys->pi_fd = net_ListenTCP( p_intf, url.psz_host, url.i_port ) ) == NULL )
     {
         msg_Err( p_intf, "cannot listen for telnet" );
-        vlm_Delete( p_intf->p_sys->mediatheque );
+        vlm_Delete( mediatheque );
         vlc_UrlClean( &url );
         free( p_intf->p_sys );
         return VLC_EGENERIC;