]> git.ipfire.org Git - thirdparty/asterisk.git/commit
Prevent invalid access of free'd memory if DAHDI channel during an MWI event
authorRichard Mudgett <rmudgett@digium.com>
Tue, 10 Apr 2012 21:43:53 +0000 (21:43 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Tue, 10 Apr 2012 21:43:53 +0000 (21:43 +0000)
commitb856533029fafa891e2f80de737f3fe5acd5e3f1
tree7c4cc6a7603a64ca5933f05e514482aafdd0ce0a
parent40beb62845f04b4d4248b1be08b162c19daf4327
Prevent invalid access of free'd memory if DAHDI channel during an MWI event

In the MWI processing loop, when a valid event occurs the temporary caller ID
information is deallocated.  If a new DAHDI channel is successfully created,
the event is passed up to the analog_ss_thread without error and the loop
exits.  If, however, the DAHDI channel is not created, then the caller ID
struct has been free'd, and the gains reset to their previous level.  This
will almost certainly cause an invalid access to the free'd memory, either
in subsequent calls to callerid_free or calls to callerid_feed.

* Rework the -r361705 patch to better manage the cs and mtd allocated
resources.

* Fixed use of mwimonitoractive flag to be correct if the mwi_thread()
fails to start.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@361854 65c4cc65-6c06-0410-ace0-fbb531ad65f3
channels/chan_dahdi.c