[asterisk-bugs] [Asterisk 0017798]: Another sip_peer structure leak

Asterisk Bug Tracker noreply at bugs.digium.com
Thu Aug 19 15:35:41 CDT 2010


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=17798 
====================================================================== 
Reported By:                kkm
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   17798
Category:                   Channels/chan_sip/General
Reproducibility:            N/A
Severity:                   minor
Priority:                   normal
Status:                     acknowledged
Asterisk Version:           SVN 
JIRA:                       SWP-2010 
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2010-08-04 21:58 CDT
Last Modified:              2010-08-19 15:35 CDT
====================================================================== 
Summary:                    Another sip_peer structure leak
Description: 
I found a few places in chan_sip.c where multiple peers are removed by a 
call to ao2_t_callback(peers,..OBJ_UNLINK, ...). There is no 
corresponding attempt to removed them also from the peers_by_ip list:

In sip_prune_realtime() near line 15884
In reload_config() near line 26188
In sip_do_reload() near line 27747

Interesting that in another branch of sip_prune_realtime(), when a 
single peers is removed, it is unlinked from peers_by_ip.

Also, in build_peer() near line 25448, a single peer is removed from 
peers but not peers_by_ip().
====================================================================== 

---------------------------------------------------------------------- 
 (0126167) svnbot (reporter) - 2010-08-19 15:35
 https://issues.asterisk.org/view.php?id=17798#c126167 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 282892

_U  trunk/
U   trunk/channels/chan_sip.c

------------------------------------------------------------------------
r282892 | dvossel | 2010-08-19 15:35:40 -0500 (Thu, 19 Aug 2010) | 18
lines

Merged revisions 282891 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r282891 | dvossel | 2010-08-19 15:34:41 -0500 (Thu, 19 Aug 2010) | 11
lines
  
  Merged revisions 282890 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r282890 | dvossel | 2010-08-19 15:31:22 -0500 (Thu, 19 Aug 2010) | 5
lines
    
    fixes sip peer memory leaks in the peer_by_ip table
    
    (issue https://issues.asterisk.org/view.php?id=17798)
  ........
................

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

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

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-08-19 15:35 svnbot         Checkin                                      
2010-08-19 15:35 svnbot         Note Added: 0126167                          
======================================================================




More information about the asterisk-bugs mailing list