From 573cd3ff2244637af0888b08d6ebdb3fa79cc007 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Wed, 24 Apr 2019 15:52:18 -0400 Subject: [PATCH] TT#58050 fix refcount bug Every packet_stream gets a send_timer allocated, but the teardown routine skips the refcount decrease for fallback RTCP streams (when rtcp-mux is in use), resulting in mem leak fixes #753 Change-Id: Ib3a4ef8a81135918f08e28e127e4bb557b8ea05d --- daemon/call.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/daemon/call.c b/daemon/call.c index 28635a47c..790f6506e 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -2161,6 +2161,8 @@ void call_destroy(struct call *c) { for (o = md->streams.head; o; o = o->next) { ps = o->data; + send_timer_put(&ps->send_timer); + if (PS_ISSET(ps, FALLBACK_RTCP)) continue; @@ -2180,7 +2182,6 @@ void call_destroy(struct call *c) { rtpe_now.tv_sec - atomic64_get(&ps->last_packet)); statistics_update_totals(ps); - send_timer_put(&ps->send_timer); }