[Home]

Summary:ASTERISK-12515: [patch] iax2-provision is not freeing iax_templates structure.
Reporter:Eliel Sardanons (eliel)Labels:
Date Opened:2008-08-04 07:23:00Date Closed:2008-12-03 13:25:46.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Channels/chan_iax2
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) iax2-provision.patch.txt
Description:The IAX2 provisioning templates structure is not being freed when unloading the chan_iax2.so module.
This leads to 244bytes in a out of the box installation.
Comments:By: Russell Bryant (russell) 2008-08-05 07:17:43

It would rock if you could just convert this to use the list macros while we're changing the code, anyway.  :)

By: Eliel Sardanons (eliel) 2008-08-05 07:22:22

Ok, give me some time!

By: Eliel Sardanons (eliel) 2008-08-05 10:34:34

I couldn't use a LOCKED list, cause it is using a not so nice provlock mutex in not so simple ways, so I leave the lock.
Also notice that it was copying a structure in this way:
memcpy(dsttemplate, srctemplate, sizeof()); and it was overwriting the ->next element, with the AST_LIST implementation, we can't preserve this ->next element cause we don't know the list implementation/members, so I have added a iax_template_copy().



By: Eliel Sardanons (eliel) 2008-12-03 11:25:26.000-0600

A review request was created http://reviewboard.digium.com/r/72/

By: Digium Subversion (svnbot) 2008-12-03 13:25:46.000-0600

Repository: asterisk
Revision: 160663

U   trunk/channels/iax2-provision.c

------------------------------------------------------------------------
r160663 | eliel | 2008-12-03 13:25:45 -0600 (Wed, 03 Dec 2008) | 13 lines

- iax2-provision was not freeing iax_templates structure when unloading the chan_iax2.so module.
- Move the code to start using the LIST macros.

Review: http://reviewboard.digium.com/r/72

(closes issue ASTERISK-12515)
Reported by: eliel
Patches:
     iax2-provision.patch.txt uploaded by eliel (license 64)
     (with minor changes pointed by Mark Michelson on review board)
Tested by: eliel


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

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