]> 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:02:03 +0000 (20:02 +0000)
commit2f8d0081039a44fe8eefd327db41ce628b3d2c6f
tree8dce7911f925b3b24979c6565fcc9a72b088d035
parent039baa03170a8ab71bedba3ee9f5a6f9ae65289d
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 41162f963b0d7b13128bef4a02a9bb456c4b6836)
main/core_unreal.c
main/stream.c