]> git.ipfire.org Git - thirdparty/asterisk.git/commit
main/app.c: Memory corruption from early format destruction. 95/4795/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:08 +0000 (14:04 -0600)
commitab8cb5a7ce227ed2c889d58a04d7167aa49e3f63
tree3cd9b11893c37292c05b5d7d78810d630b986b86
parent48178e5918967337624a7e43ff1d84a7bb63fa85
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