[Home]

Summary:ASTERISK-01449: pbx_builtin_goto has a minor memory leak
Reporter:bleckey (bleckey)Labels:
Date Opened:2004-04-21 17:50:39Date Closed:2008-01-15 14:51:25.000-0600
Priority:TrivialRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) pbx.c.diff
Description:pbx_builtin_goto does a strdup, thus creating a new string.  In the event of an error it frees that new memory, but if it exits successfully the memory isn't freed, and is therefore lost.

I've attached a diff based on the latest CVS to fix the problem.
Comments:By: Mark Spencer (markster) 2004-04-21 20:23:21

I just used ast_strdupa instead.

By: Digium Subversion (svnbot) 2008-01-15 14:51:25.000-0600

Repository: asterisk
Revision: 2735

U   trunk/pbx.c

------------------------------------------------------------------------
r2735 | markster | 2008-01-15 14:51:25 -0600 (Tue, 15 Jan 2008) | 2 lines

Use ast_strdupa instead of strdup in goto (bug ASTERISK-1449)

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

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