[Home]

Summary:ASTERISK-06000: [patch] pbx_spool.c: leaks memory on DelayedRetry
Reporter:Tzafrir Cohen (tzafrir)Labels:
Date Opened:2006-01-06 18:21:58.000-0600Date Closed:2008-01-15 16:13:13.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) pbxspool_leak_fix.dpatch
Description:scan_service() allocates a struct_outgoing (o) and in one code path it fails to either free it or pass it along to another function.

****** ADDITIONAL INFORMATION ******

Another note: scan_service allocates several resources and has to free them all. Maybe it would be less error prone to use goto in error handlers to jump to a short piece of code to release everything in the proper order.

This should prevent the need for the deep nesting.
Comments:By: Tzafrir Cohen (tzafrir) 2006-01-07 07:54:11.000-0600

Now it has a patch :-(

By: Tilghman Lesher (tilghman) 2006-01-07 08:07:50.000-0600

I'm surprised you're still working on 1.0, but as it's a legitimate memory leak, I'll fix it.

By: Tilghman Lesher (tilghman) 2006-01-07 08:12:57.000-0600

Actually, nevermind.  I can't commit to 1.0.

By: Russell Bryant (russell) 2006-01-09 10:53:50.000-0600

Are you saying it is only an issue in 1.0?

By: Tilghman Lesher (tilghman) 2006-01-09 11:46:41.000-0600

Yes, it's only in 1.0.

By: Tzafrir Cohen (tzafrir) 2006-01-09 12:08:15.000-0600

I have identified it in 1.0 . However from the looks of the code the same leak seems to still be there in 1.2 and probably also in the trunk (testing it requires some stress-testing that I'll avoid for the moment).

I wouldn't bother anybody with 1.0 bugs.

By: Tilghman Lesher (tilghman) 2006-01-09 12:36:32.000-0600

You're mistaken.  This memory leak is not in either 1.2 or trunk, mainly due to the code restructuring that took place prior to the release of 1.2.

By: Tilghman Lesher (tilghman) 2006-01-09 13:12:59.000-0600

Okay, you convinced me.  It's fixed.

By: Russell Bryant (russell) 2006-01-09 15:04:02.000-0600

fixed in 1.0 as well

By: Digium Subversion (svnbot) 2008-01-15 16:13:13.000-0600

Repository: asterisk
Revision: 7914

U   branches/1.0/pbx/pbx_spool.c

------------------------------------------------------------------------
r7914 | russell | 2008-01-15 16:13:13 -0600 (Tue, 15 Jan 2008) | 2 lines

fix memory leak with DelayedRetry (issue ASTERISK-6000)

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

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