summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2017-09-06 13:38:17 -0500
committerRichard Mudgett <rmudgett@digium.com>2017-09-06 13:38:17 -0500
commit4bed94b04486cc1a6d1fc364c8602f020817d301 (patch)
treeb925fb236e579cd96d1134455afc922e17a4b5a1
parent47e4cbc3952b08c24e6a22c943442b2382c13861 (diff)
stasis/control.c: Fix set_interval_hook() ref leak.
Change-Id: Ia0edb7dc0dbbb879c079ff7000f1b722d86ce7dc
-rw-r--r--res/stasis/control.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/res/stasis/control.c b/res/stasis/control.c
index 219a2c6cd..ab1798556 100644
--- a/res/stasis/control.c
+++ b/res/stasis/control.c
@@ -1135,10 +1135,12 @@ static void set_interval_hook(struct ast_channel *chan)
if (ast_bridge_interval_hook(bridge_channel->features, 0, ms > 0 ? ms : 1,
bridge_timeout, NULL, NULL, 0)) {
+ ao2_ref(bridge_channel, -1);
return;
}
ast_queue_frame(bridge_channel->chan, &ast_null_frame);
+ ao2_ref(bridge_channel, -1);
}
int control_swap_channel_in_bridge(struct stasis_app_control *control, struct ast_bridge *bridge, struct ast_channel *chan, struct ast_channel *swap)