This avoids double frees in RTMP_Close(), if the
RTMP_SendBytesReceived() call failed, which earlier led
to RTMP_ReadPacket() writing back an already freed buffer
(freed by RTMP_Close() within WriteN()) into m_vecChannelsIn.
r->m_nBytesIn += nRead;
if (r->m_bSendCounter
&& r->m_nBytesIn > r->m_nBytesInSent + r->m_nClientBW / 2)
- SendBytesReceived(r);
+ if (!SendBytesReceived(r))
+ return FALSE;
}
/*RTMP_Log(RTMP_LOGDEBUG, "%s: %d bytes\n", __FUNCTION__, nBytes); */
#ifdef _DEBUG