Commit 69ec164a authored by Pierre Ynard's avatar Pierre Ynard

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).
parent b471a8b1
......@@ -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 );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment