[asterisk-dev] [Code Review] Resolve severe memory leak in CEL logging modules.

rmudgett reviewboard at asterisk.org
Wed Jul 18 13:29:00 CDT 2012


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/2053/#review6714
-----------------------------------------------------------



/branches/1.8/main/cel.c
<https://reviewboard.asterisk.org/r/2053/#comment12749>

    Not constant data but data that does not need to be destroyed.



/branches/1.8/main/cel.c
<https://reviewboard.asterisk.org/r/2053/#comment12750>

    You could initialize the tchan appl and data pointer assignments before filling in the string contents.  You could then use the tchan->appl and tchan->data values instead of recalculating the locations.


- rmudgett


On July 18, 2012, 12:26 p.m., Kevin Fleming wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2053/
> -----------------------------------------------------------
> 
> (Updated July 18, 2012, 12:26 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> A customer reported a significant memory leak using Asterisk 1.8. They have tracked it down do ast_cel_fabricate_channel_from_event() in main/cel.c, which is called by both in-tree CEL logging modules (cel_custom.c and cel_sqlite3_custom.c) for each and every CEL event that they log.
> 
> The cause was an incorrect assumption about how data attached to an ast_channel would be handled when the channel is destroyed; the data is now stored in a datastore attached to the channel, which is destroyed along with the channel at the proper time.
> 
> 
> Diffs
> -----
> 
>   /branches/1.8/main/cel.c 370182 
> 
> Diff: https://reviewboard.asterisk.org/r/2053/diff
> 
> 
> Testing
> -------
> 
> Compile testing only.
> 
> 
> Thanks,
> 
> Kevin
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20120718/7424b3fa/attachment-0001.htm>


More information about the asterisk-dev mailing list