]> 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)
committerGeorge Joseph <gjoseph@sangoma.com>
Thu, 17 Oct 2024 15:20:34 +0000 (15:20 +0000)
commitd6ffbff3331e9afe8a8510fce4ca06ab28217eef
treefdbb758645808872eed6b49390ae2a9fd1926f21
parent99221c81edc572d0a1a35c29e98267fa71ced720
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
main/core_unreal.c
main/stream.c