[rtmpdump] [PATCH] Free extra link data when closing connection.
Josh Allmann
joshua.allmann at gmail.com
Tue Sep 23 23:20:23 CEST 2014
Fixes a small leak when initializing a new connection.
Any extra data passed into RTMP_SetupURL is copied into the
Link.extras AMF object, which should be eventually freed.
This will keep leaking if RTMP_SetupURL is called without a
corresponding RTMP_Close.
---
librtmp/rtmp.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/librtmp/rtmp.c b/librtmp/rtmp.c
index 6e788bb..c5ea68c 100644
--- a/librtmp/rtmp.c
+++ b/librtmp/rtmp.c
@@ -4215,6 +4215,8 @@ RTMP_Close(RTMP *r)
r->m_resplen = 0;
r->m_unackd = 0;
+ if (r->Link.extras.o_num) AMF_Reset(&r->Link.extras);
+
if (r->Link.lFlags & RTMP_LF_FTCU)
{
free(r->Link.tcUrl.av_val);
--
1.7.9.5
More information about the rtmpdump
mailing list