From: George Joseph Date: Mon, 8 Jun 2020 00:02:00 +0000 (-0600) Subject: app_confbridge: Plug ref leak of bridge channel with send_events X-Git-Tag: 17.6.0-rc1~28 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bc0207d0dd0118cd07cd959a96753f385c58e68d;p=thirdparty%2Fasterisk.git app_confbridge: Plug ref leak of bridge channel with send_events When send_events is enabled for a user, we were leaking a reference to the bridge channel in confbridge_manager.c:send_message(). This also caused the bridge snapshot to not be destroyed. Change-Id: I87a7ae9175e3cd29f6d6a8750e0ec5427bd98e97 --- diff --git a/apps/confbridge/confbridge_manager.c b/apps/confbridge/confbridge_manager.c index 06cb43321a..45a1beffc2 100644 --- a/apps/confbridge/confbridge_manager.c +++ b/apps/confbridge/confbridge_manager.c @@ -367,7 +367,7 @@ static void send_message(const char *msg_name, char *conf_name, struct ast_json char *json; int rc = 0; struct ast_frame f; - struct ast_bridge_channel *bridge_chan; + RAII_VAR(struct ast_bridge_channel *, bridge_chan, NULL, ao2_cleanup); bridge_chan = ast_channel_get_bridge_channel(chan); if (!bridge_chan) {