[Home]

Summary:ASTERISK-10859: [patch] dialplan remove extension make coredump if asterisk compiled with MALLOC_DEBUG options
Reporter:Yuri (ys)Labels:
Date Opened:2007-11-22 07:11:38.000-0600Date Closed:2007-11-26 11:36:29.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:PBX/pbx_config
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) pbx.pbx_config.c.diff
Description:
pbx/pbx_config.c: In function ast_add_extension() used free() function.
That free appdata memory, if extension are destroyed by destroy_exten() function.

To solve this, i replace free to ast_free in ast_add_extension().

This was found in trunk, but exist in branch-1.4 too.

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


*CLI> dialplan add extension 1,2,hangup(), into test
   -- Added extension '1' priority 2 to test
Extension '1,2,hangup,' added into 'test' context
*CLI> dialplan remove extension 1@test
asterisk in free(): error: modified (chunk-) pointer
Abort trap (core dumped)
Comments:By: Digium Subversion (svnbot) 2007-11-26 11:34:17.000-0600

Repository: asterisk
Revision: 89592

U   branches/1.4/pbx/pbx_config.c

------------------------------------------------------------------------
r89592 | file | 2007-11-26 11:34:16 -0600 (Mon, 26 Nov 2007) | 6 lines

Use ast_free to free memory, or else we shall implode if MALLOC_DEBUG is enabled.
(closes issue ASTERISK-10859)
Reported by: ys
Patches:
     pbx.pbx_config.c.diff uploaded by ys (license 281)

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

By: Digium Subversion (svnbot) 2007-11-26 11:36:29.000-0600

Repository: asterisk
Revision: 89593

_U  trunk/
U   trunk/pbx/pbx_config.c

------------------------------------------------------------------------
r89593 | file | 2007-11-26 11:36:28 -0600 (Mon, 26 Nov 2007) | 14 lines

Merged revisions 89592 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89592 | file | 2007-11-26 13:36:45 -0400 (Mon, 26 Nov 2007) | 6 lines

Use ast_free to free memory, or else we shall implode if MALLOC_DEBUG is enabled.
(closes issue ASTERISK-10859)
Reported by: ys
Patches:
     pbx.pbx_config.c.diff uploaded by ys (license 281)

........

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