aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authorjpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b>2009-10-06 19:26:11 +0000
committerjpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b>2009-10-06 19:26:11 +0000
commit1dde06eb98953c219135b5a9c42a216224578dd4 (patch)
tree01a5cbe67dd771aac176c2563e5cd70002023af3 /channels
parent818c5e7f652d41c8c672fb84cfadd5d6d3ba502a (diff)
Merged revisions 222298 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r222298 | jpeeler | 2009-10-06 14:24:59 -0500 (Tue, 06 Oct 2009) | 9 lines 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: http://svn.digium.com/svn/asterisk/branches/1.6.0@222302 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_dahdi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c
index a140caf20..e9128fd5a 100644
--- a/channels/chan_dahdi.c
+++ b/channels/chan_dahdi.c
@@ -3137,8 +3137,9 @@ static void destroy_dahdi_pvt(struct dahdi_pvt **pvt)
ast_smdi_interface_unref(p->smdi_iface);
if (p->mwi_event_sub)
ast_event_unsubscribe(p->mwi_event_sub);
- if (p->vars)
+ if (p->vars && iflist && !iflist->next) {
ast_variables_destroy(p->vars);
+ }
ast_mutex_destroy(&p->lock);
dahdi_close_sub(p, SUB_REAL);
if (p->owner)