[asterisk-bugs] [Asterisk 0015899]: crash on second 'dahdi destroy channel' if a var was set

Asterisk Bug Tracker noreply at bugs.digium.com
Tue Oct 6 14:29:25 CDT 2009


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=15899 
====================================================================== 
Reported By:                tzafrir
Assigned To:                jpeeler
====================================================================== 
Project:                    Asterisk
Issue ID:                   15899
Category:                   Channels/chan_dahdi
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     closed
Asterisk Version:           SVN 
JIRA:                        
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 218464 
Request Review:              
Resolution:                 fixed
Fixed in Version:           
====================================================================== 
Date Submitted:             2009-09-15 06:19 CDT
Last Modified:              2009-10-06 14:29 CDT
====================================================================== 
Summary:                    crash on second 'dahdi destroy channel' if a var was
set
Description: 
dell*CLI> dahdi destroy channel 1
dell*CLI> dahdi destroy channel 2
dell*CLI>
Disconnected from Asterisk server
Executing last minute cleanups
Asterisk ending (0).

It will crash this way if any variable was set in chan_dahdi.conf using
setvar.

This is because of the following in chan_dahdi.c:11259 (function mkintf)

                if (conf->chan.vars) {
                        tmp->vars = conf->chan.vars;
                }

conf->chan.vars is thus common to all channels.

Fix should be to copy each variable seperately.
====================================================================== 

---------------------------------------------------------------------- 
 (0111923) svnbot (reporter) - 2009-10-06 14:29
 https://issues.asterisk.org/view.php?id=15899#c111923 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 222302

_U  branches/1.6.0/
U   branches/1.6.0/channels/chan_dahdi.c

------------------------------------------------------------------------
r222302 | jpeeler | 2009-10-06 14:29:25 -0500 (Tue, 06 Oct 2009) | 15
lines

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 https://issues.asterisk.org/view.php?id=15899)
  Reported by: tzafrir
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=222302 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-10-06 14:29 svnbot         Checkin                                      
2009-10-06 14:29 svnbot         Note Added: 0111923                          
======================================================================




More information about the asterisk-bugs mailing list