Fix crash during destruction of second channel when variable set with setvar.
authorJeff Peeler <jpeeler@digium.com>
Tue, 6 Oct 2009 19:24:59 +0000 (19:24 +0000)
committerJeff Peeler <jpeeler@digium.com>
Tue, 6 Oct 2009 19:24:59 +0000 (19:24 +0000)
commit0c7f4cfb85d10874c9cd6b7f855a033cd0e19cc8
tree9bf9634723c707eb30086e4484ab57c0ff4bae3b
parent78012e4f713fb76cea7cc55383fdab93479cc0ba
Fix crash during destruction of second channel when variable set with setvar.

The setvar line in chan_dahdi.conf is shared among all the channels, so make
sure to only free the resources only when the last channel is destroyed.

(closes issue #15899)
Reported by: tzafrir

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