ast_cel_report_event would geet a reference to the
bridged channel. However, certain return paths, such
as if CEL was not enabled, would result in a reference
leak. All return paths now properly unref the channel.
(closes issue #15991)
Reported by: mmichelson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@220995
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
if (!cel_enabled || !ast_cel_track_event(event_type)) {
ast_mutex_unlock(&reload_lock);
+ if (peer) {
+ ast_channel_unref(peer);
+ }
return 0;
}
char *app;
if (!(app = ao2_find(appset, (char *) chan->appl, OBJ_POINTER))) {
ast_mutex_unlock(&reload_lock);
+ if (peer) {
+ ast_channel_unref(peer);
+ }
return 0;
}
ao2_ref(app, -1);