From 02490bf3587d86a730e0de12572026504e2cb942 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Martin=20Storsj=C3=B6?= Date: Thu, 1 Dec 2011 11:34:06 +0200 Subject: [PATCH] rtmp: Clean up properly if the handshake failed MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This prevents memory leaks if this function returns an error. Signed-off-by: Martin Storsjö --- libavformat/rtmpproto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.7.4