]> 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:01:34 +0000 (20:01 +0000)
commit5989b1ea02a9326867c3a64362b38555c31ba679
tree8ab612fde008a8780a0402ac2a54df337cc55f33
parentb104c5837d245abf9c36a0afb4c1dd5a0712033d
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 e434203810e188b79351f18bfb2a915e68772589)
main/core_unreal.c
main/stream.c