librtmp: Fix memory leak
A leak was introduced by commit 1682d77 (July 11 2015). This is a fix.
This commit is contained in:
parent
15a642291e
commit
f1f49bc197
@ -4288,14 +4288,14 @@ RTMP_Close(RTMP *r)
|
||||
r->m_customSendParam = NULL;
|
||||
|
||||
#if defined(CRYPTO) || defined(USE_ONLY_MD5)
|
||||
for (int idx = 0; idx < r->Link.nStreams; idx++)
|
||||
{
|
||||
free(r->Link.streams[idx].playpath.av_val);
|
||||
r->Link.streams[idx].playpath.av_val = NULL;
|
||||
}
|
||||
|
||||
if (!(r->Link.protocol & RTMP_FEATURE_WRITE) || (r->Link.pFlags & RTMP_PUB_CLEAN))
|
||||
{
|
||||
for (int idx = 0; idx < r->Link.nStreams; idx++)
|
||||
{
|
||||
free(r->Link.streams[idx].playpath.av_val);
|
||||
r->Link.streams[idx].playpath.av_val = NULL;
|
||||
}
|
||||
|
||||
r->Link.curStreamIdx = 0;
|
||||
r->Link.nStreams = 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user