]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_agi.c: Prevent possible double free during `SPEECH RECOGNIZE`
authorjiangxc <jiangxc08@qq.com>
Wed, 17 Jul 2024 09:02:33 +0000 (17:02 +0800)
committerjiangxc <jiangxc08@qq.com>
Mon, 30 Sep 2024 16:23:41 +0000 (16:23 +0000)
commit2d676c756002a82c3e6babf4594c2977a2a5836e
treed4617cd7b67fdc257e6d039dc02447260ed55c43
parent084c04f7113de3971253cde4e7da2b4ce2541656
res_agi.c: Prevent possible double free during `SPEECH RECOGNIZE`

When using the speech recognition module, crashes can occur
sporadically due to a "double free or corruption (out)" error. Now, in
the section where the audio stream is being captured in a loop, each
time after releasing fr, it is set to NULL to prevent repeated
deallocation.

Fixes #772
res/res_agi.c