Commit acfb169d authored by mstorsjo's avatar mstorsjo

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.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@23643 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent f315877d
...@@ -1594,12 +1594,14 @@ redirect: ...@@ -1594,12 +1594,14 @@ redirect:
/* complete the connection */ /* complete the connection */
if (url_read(rtsp_hd, NULL, 0)) { if (url_read(rtsp_hd, NULL, 0)) {
url_close(rtsp_hd);
err = AVERROR(EIO); err = AVERROR(EIO);
goto fail; goto fail;
} }
/* POST requests */ /* POST requests */
if (url_open(&rtsp_hd_out, httpname, URL_WRONLY) < 0 ) { if (url_open(&rtsp_hd_out, httpname, URL_WRONLY) < 0 ) {
url_close(rtsp_hd);
err = AVERROR(EIO); err = AVERROR(EIO);
goto fail; goto fail;
} }
......
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