]> git.ipfire.org Git - thirdparty/asterisk.git/commit
core_unreal.c: Fix memory leak in ast_unreal_new_channels()
authorGeorge Joseph <gjoseph@sangoma.com>
Tue, 15 Oct 2024 17:11:28 +0000 (11:11 -0600)
committerAsterisk Development Team <asteriskteam@digium.com>
Thu, 14 Nov 2024 20:00:45 +0000 (20:00 +0000)
commitb09a49e8ddfa21c1f857c7a47d3a070f7ab0f781
treeae52a544c470a5b04e91520b5ed61fbd8913a317
parentfddb8270e83509142207d9e3ad33fb00fb6d91fa
core_unreal.c: Fix memory leak in ast_unreal_new_channels()

When the channel tech is multistream capable, the reference to
chan_topology was passed to the new channel.  When the channel tech
isn't multistream capable, the reference to chan_topology was never
released.  "Local" channels are multistream capable so it didn't
affect them but the confbridge "CBAnn" and the bridge_media
"Recorder" channels are not so they caused a leak every time one
of them was created.

Also added tracing to ast_stream_topology_alloc() and
stream_topology_destroy() to assist with debugging.

Resolves: #938
(cherry picked from commit d6ffbff3331e9afe8a8510fce4ca06ab28217eef)
main/core_unreal.c
main/stream.c