]> git.ipfire.org Git - thirdparty/asterisk.git/commit
main/app.c: Memory corruption from early format destruction. 97/4797/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:05:05 +0000 (14:05 -0600)
commitde28c1b9f183d40a00c4cd87ae57585c9852380e
treeb1993e53e630b36d510c18585adb2f6f6b2795bc
parentf517c015e244f54a94a10b419163425c8131d497
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