Release the allocated channel decreasing the reference counter.
authorEliel C. Sardanons <eliels@gmail.com>
Thu, 11 Jun 2009 15:40:03 +0000 (15:40 +0000)
committerEliel C. Sardanons <eliels@gmail.com>
Thu, 11 Jun 2009 15:40:03 +0000 (15:40 +0000)
commitdabfa94fdcbdfa75a3c1e74884b7ef6b26d062e1
tree2b2009feede81f2af2dc3172e8d6db649e501bd4
parentb37041f2db79e6bb0a8fb0837b3ee42037eb4e0d
Release the allocated channel decreasing the reference counter.

When allocating the channel use ao2_ref(-1) to release it, instead of calling
ast_free().
Also avoid freeing structures inside that channel (on error) if they will be
released by the channel destructor being called if the reference counter reachs
0.

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