mirror of https://git.ffmpeg.org/ffmpeg.git
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:
parent
6af354436c
commit
02490bf358
|
@ -826,7 +826,7 @@ static int rtmp_open(URLContext *s, const char *uri, int flags)
|
||||||
|
|
||||||
rt->state = STATE_START;
|
rt->state = STATE_START;
|
||||||
if (rtmp_handshake(s, rt))
|
if (rtmp_handshake(s, rt))
|
||||||
return -1;
|
goto fail;
|
||||||
|
|
||||||
rt->chunk_size = 128;
|
rt->chunk_size = 128;
|
||||||
rt->state = STATE_HANDSHAKED;
|
rt->state = STATE_HANDSHAKED;
|
||||||
|
|
Loading…
Reference in New Issue