]> git.ipfire.org Git - thirdparty/asterisk.git/commit
manager: Fix crash when appending a manager channel variable
authorMatthew Jordan <mjordan@digium.com>
Sat, 28 Sep 2013 20:20:42 +0000 (20:20 +0000)
committerMatthew Jordan <mjordan@digium.com>
Sat, 28 Sep 2013 20:20:42 +0000 (20:20 +0000)
commita1c1fc3538aa3e524611fc5695a8c7d1ae8a4ee9
tree2dd98fb3438ea867297fcca15db435007117e3b0
parent8a41aa9bf59e2948618661c2989b4cffbb0a8deb
manager: Fix crash when appending a manager channel variable

In r399887, a minor performance improvement was introduced by not allocating
the manager variable struct if it wasn't used. Unfortunately, when directly
accessing an ast_channel struct, manager assumed that the struct was always
allocated. Since this was no longer the case, things got a bit crashy.

This fixes that problem by simply bypassing appending variables if the manager
channel variable struct isn't there.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@400058 65c4cc65-6c06-0410-ace0-fbb531ad65f3
main/manager.c