Fix segfault when dealing with chan_agent channels.
authorRichard Mudgett <rmudgett@digium.com>
Wed, 29 May 2013 20:24:18 +0000 (20:24 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Wed, 29 May 2013 20:24:18 +0000 (20:24 +0000)
commitf069ee9681b2def71d211ad3ca65db66b7072eef
treefd6c2d46cdb2b63c58eb79a83b844827e2b57ebc
parentfa98eb2aeae9858832c1ed45b4e2e62204e2b208
Fix segfault when dealing with chan_agent channels.

Check the returned bridged pointer for NULL to avoid a crash.  It looks
like chan_agent is returning a NULL pointer when it probably should be
returning a pointer to the channel the Agent channel is pretending to be.

(closes issue ASTERISK-21793)
Reported by: Rodrigo P. Telles
Patches:
      jira_asterisk_21793_v1.8.patch (license #5621) patch uploaded by rmudgett
Tested by: Rodrigo P. Telles
........

Merged revisions 390044 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 390047 from http://svn.asterisk.org/svn/asterisk/branches/11

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@390068 65c4cc65-6c06-0410-ace0-fbb531ad65f3
main/channel.c