[FFmpeg-cvslog] rtmp: Clean up properly if the handshake failed
Martin Storsjö
git at videolan.org
Fri Dec 2 01:00:52 CET 2011
ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Thu Dec 1 11:34:06 2011 +0200| [02490bf3587d86a730e0de12572026504e2cb942] | committer: Martin Storsjö
rtmp: Clean up properly if the handshake failed
This prevents memory leaks if this function returns an error.
Signed-off-by: Martin Storsjö <martin at martin.st>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=02490bf3587d86a730e0de12572026504e2cb942
---
libavformat/rtmpproto.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c
index 37c3d95..979c5b6 100644
--- a/libavformat/rtmpproto.c
+++ b/libavformat/rtmpproto.c
@@ -826,7 +826,7 @@ static int rtmp_open(URLContext *s, const char *uri, int flags)
rt->state = STATE_START;
if (rtmp_handshake(s, rt))
- return -1;
+ goto fail;
rt->chunk_size = 128;
rt->state = STATE_HANDSHAKED;
More information about the ffmpeg-cvslog
mailing list