]> git.ipfire.org Git - thirdparty/asterisk.git/commit
main/app.c: Memory corruption from early format destruction. 96/4796/1
authorRichard Mudgett <rmudgett@digium.com>
Tue, 10 Jan 2017 19:11:20 +0000 (13:11 -0600)
committerRichard Mudgett <rmudgett@digium.com>
Tue, 24 Jan 2017 20:04:51 +0000 (14:04 -0600)
commit5db078273de4066ab70a93ed2a76315ecbf897f2
treeb2690b77d01000609f206bc7268ad31cac3f36ee
parent3ddf7da3a7a149e7b735509a0e47a950bb0973ec
main/app.c: Memory corruption from early format destruction.

* make_silence() created a malloced silence slin frame without adding a
slin format ref.  When the frame is destroyed it will unref the slin
format that never had a ref added.  Memory corruption is expected to
follow.

* Simplified and fixed counting the number of samples in a frame list for
make_silence().

* Eliminated an unnecessary RAII_VAR associated with the make_silence()
frame.

Change-Id: I47de3f9b92635b7f8b4d72309444d6c0aee6f747
main/app.c