[asterisk-bugs] [Asterisk 0016554]: [patch] Huge memory leak

Asterisk Bug Tracker noreply at bugs.digium.com
Wed Jan 20 08:06:51 CST 2010


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=16554 
====================================================================== 
Reported By:                mav3rick
Assigned To:                seanbright
====================================================================== 
Project:                    Asterisk
Issue ID:                   16554
Category:                   Applications/General
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     ready for testing
Target Version:             1.4.30
Asterisk Version:           1.4.28 
JIRA:                       SWP-643 
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2010-01-06 03:16 CST
Last Modified:              2010-01-20 08:06 CST
====================================================================== 
Summary:                    [patch] Huge memory leak
Description: 
I detected a memory leak on all my Asterisk servers. 

After 1 day, Asterisk is using 100+ meg.

I recompiled with MALLOC_DEBUG on DONT_OPTIMIZE. 
See dump of memory summary and memory allocations.

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

---------------------------------------------------------------------- 
 (0116982) svnbot (reporter) - 2010-01-20 08:06
 https://issues.asterisk.org/view.php?id=16554#c116982 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 241543

U   branches/1.4/pbx/pbx_spool.c

------------------------------------------------------------------------
r241543 | seanbright | 2010-01-20 08:06:50 -0600 (Wed, 20 Jan 2010) | 14
lines

Fix a memory leak in pbx_spool when using SetVar in a call file.

In pbx_spool, when we are freeing our 'outgoing' struct, we weren't
deallocating
the ast_variable list we had built from SetVars in a call file.  Adding a
call to
ast_variables_destroy in our deallocation routine works, but only if the
variables
have not already been passed into ast_pbx_outgoing_app() or _exten(), both
of
which take care of destroying the variable list for us.

(closes issue https://issues.asterisk.org/view.php?id=16554)
Reported by: mav3rick
Patches:
      issue16554_20100119.patch uploaded by seanbright (license 71)
Tested by: mav3rick

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

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

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-01-20 08:06 svnbot         Note Added: 0116982                          
======================================================================




More information about the asterisk-bugs mailing list