From: Pierre Ynard Date: Thu, 28 Jan 2010 00:59:43 +0000 (+0100) Subject: rtp sout: fix another race condition in RTSP X-Git-Tag: 1.1.0-ff~800 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=69ec164abb756871a3b7421493d28da1288a6bad;p=vlc rtp sout: fix another race condition in RTSP When RTSP is shut down, the server destroys sessions (with no locking) while clients are still able to concurrently access them, potentially leading to a crash. Make sure we unregister the RTSP URL before cleaning up (then indeed no locking is needed). --- diff --git a/modules/stream_out/rtsp.c b/modules/stream_out/rtsp.c index 1f58f75e0e..0d103fa6d2 100644 --- a/modules/stream_out/rtsp.c +++ b/modules/stream_out/rtsp.c @@ -122,12 +122,12 @@ error: void RtspUnsetup( rtsp_stream_t *rtsp ) { - while( rtsp->sessionc > 0 ) - RtspClientDel( rtsp, rtsp->sessionv[0] ); - if( rtsp->url ) httpd_UrlDelete( rtsp->url ); + while( rtsp->sessionc > 0 ) + RtspClientDel( rtsp, rtsp->sessionv[0] ); + if( rtsp->host ) httpd_HostDelete( rtsp->host );