avformat/librtmp: Fix memory leak if RTMP_ConnectStream() fails
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
committed by
Michael Niedermayer
parent
05c78f345b
commit
b79bccba80
@@ -134,6 +134,9 @@ static int rtmp_open(URLContext *s, const char *uri, int flags)
|
|||||||
fail:
|
fail:
|
||||||
if (filename != s->filename)
|
if (filename != s->filename)
|
||||||
av_freep(&filename);
|
av_freep(&filename);
|
||||||
|
if (rc)
|
||||||
|
RTMP_Close(r);
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user