[Home]

Summary:ASTERISK-12967: [patch] Memory leak while reloading chan_mgcp.so
Reporter:Eliel Sardanons (eliel)Labels:
Date Opened:2008-10-26 01:41:41Date Closed:2008-10-28 16:27:39
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Channels/chan_mgcp
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) chan_mgcp.c.patch
Description:When reloading chan_mgcp.so, we are not closing mgcpsock and (if the file didn change) so not calling ast_io_remove (if the file didn't change), so we dont need to call again ast_io_add unless mgcpsock_read_id is set to NULL.


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

To reproduce the leak do:
CLI*> memory show summary io.c
CLI*> module reload chan_mgcp.so
CLI*> memory show summary io.c
Comments:By: Digium Subversion (svnbot) 2008-10-28 16:27:37

Repository: asterisk
Revision: 152442

U   trunk/channels/chan_mgcp.c

------------------------------------------------------------------------
r152442 | tilghman | 2008-10-28 16:27:37 -0500 (Tue, 28 Oct 2008) | 7 lines

Only re-add the io port if it was closed, otherwise reload causes a memory
leak.
(closes issue ASTERISK-12967)
Reported by: eliel
Patches:
      chan_mgcp.c.patch uploaded by eliel (license 64)

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

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