rtmp: Clean up properly if the handshake failed

This prevents memory leaks if this function returns an error.

Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
Martin Storsjö 2011-12-01 11:34:06 +02:00
parent 6af354436c
commit 02490bf358

View File

@ -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;