[FFmpeg-cvslog] r23643 - trunk/libavformat/rtsp.c
mstorsjo
subversion
Fri Jun 18 19:54:57 CEST 2010
Author: mstorsjo
Date: Fri Jun 18 19:54:56 2010
New Revision: 23643
Log:
RTSP: Clean up rtsp_hd on failure
Since rtsp_hd isn't assigned to rt->rtsp_hd until after the setup phase,
the initialized URLContext could be leaked on failures.
Modified:
trunk/libavformat/rtsp.c
Modified: trunk/libavformat/rtsp.c
==============================================================================
--- trunk/libavformat/rtsp.c Fri Jun 18 14:02:51 2010 (r23642)
+++ trunk/libavformat/rtsp.c Fri Jun 18 19:54:56 2010 (r23643)
@@ -1594,12 +1594,14 @@ redirect:
/* complete the connection */
if (url_read(rtsp_hd, NULL, 0)) {
+ url_close(rtsp_hd);
err = AVERROR(EIO);
goto fail;
}
/* POST requests */
if (url_open(&rtsp_hd_out, httpname, URL_WRONLY) < 0 ) {
+ url_close(rtsp_hd);
err = AVERROR(EIO);
goto fail;
}
More information about the ffmpeg-cvslog
mailing list