]> git.ipfire.org Git - thirdparty/asterisk.git/commit
manager_channels.c: Fix allocation failure crash. 85/2585/2
authorRichard Mudgett <rmudgett@digium.com>
Wed, 13 Apr 2016 22:09:53 +0000 (17:09 -0500)
committerRichard Mudgett <rmudgett@digium.com>
Fri, 22 Apr 2016 21:44:05 +0000 (16:44 -0500)
commit7303e3dc96a4b2d5f36bb03c7cf8880aaa9e0753
tree7abc36b093970203b5201c6c71de8470f9406357
parent1e93f3d7232a2a087a190a18e4a3f490a41d42d1
manager_channels.c: Fix allocation failure crash.

An earlier allocation failure failed to create a channel snapshot for the
AMI HangupRequest/SoftHangupRequest event which resulted in a crash in
channel_hangup_request_cb().  Where the stasis message gets generated
cannot tell if the NULL snapshot returned was because of an allocation
failure or the channel was a dummy channel.

* Made channel_hangup_request_cb() check if the channel blob has a
snapshot and exit if it doesn't.

* Eliminated the RAII_VAR usage in channel_hangup_request_cb().

Change-Id: I0b6a1c4e95cbb7d80b2a7054c6eadecc169dfd24
main/manager_channels.c