mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-06 15:49:50 +08:00
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:
@ -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;
|
||||
|
Reference in New Issue
Block a user