[asterisk-bugs] [Asterisk 0016815]: [patch] chan_sip does not decrease module refcount on deferred BYE

Asterisk Bug Tracker noreply at bugs.digium.com
Tue May 4 14:34:29 CDT 2010


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=16815 
====================================================================== 
Reported By:                rain
Assigned To:                mnicholson
====================================================================== 
Project:                    Asterisk
Issue ID:                   16815
Category:                   Channels/chan_sip/General
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     ready for testing
Target Version:             1.6.2.9
Asterisk Version:           SVN 
JIRA:                       SWP-911 
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2010-02-11 14:35 CST
Last Modified:              2010-05-04 14:34 CDT
====================================================================== 
Summary:                    [patch] chan_sip does not decrease module refcount
on deferred BYE
Description: 
When sip_hangup clears a channel with SIP_DEFER_BYE_ON_TRANSFER set, it
will return without calling ast_module_unref().  This causes the use
counter for chan_sip to increase over time, making it impossible to unload
the module without restarting Asterisk.

The attached patch calls ast_module_unref() immediately before returning
in the deferred BYE case.  I believe this is safe, because the SIP dialog
involved will still be freed when the containing AO2 object's refcount hits
0 as part of module_unload.

====================================================================== 

---------------------------------------------------------------------- 
 (0121358) rain (reporter) - 2010-05-04 14:34
 https://issues.asterisk.org/view.php?id=16815#c121358 
---------------------------------------------------------------------- 
I've been testing this patch for a few months now, and although I haven't
had to unload chan_sip many times during that period, I've had no issues
and my refcount currently matches the number of SIP channels in use. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-05-04 14:34 rain           Note Added: 0121358                          
======================================================================




More information about the asterisk-bugs mailing list