[asterisk-dev] [Code Review] 4138: main/app.c, app_voicemail: Fix ast_writestream leaks

Mark Michelson reviewboard at asterisk.org
Fri Oct 31 15:09:53 CDT 2014


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

Ship it!


Ship It!

- Mark Michelson


On Oct. 31, 2014, 5:15 p.m., Corey Farrell wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/4138/
> -----------------------------------------------------------
> 
> (Updated Oct. 31, 2014, 5:15 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Bugs: ASTERISK-24476
>     https://issues.asterisk.org/jira/browse/ASTERISK-24476
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> Fix leak of ast_writestream recording_fs in app_voicemail:leave_voicemail.
> Fix cleanup in __ast_play_and_record where others[x] may be leaked.  This was caught where prepend != NULL && outmsg != NULL, once realfile[x] == NULL any further others[x] would be leaked.  I also added a cleanup block for prepend != NULL && outmsg == NULL.
> 
> Note: this is a serious leak, a single ast_writestream is slightly over 64k.
> 
> 
> Diffs
> -----
> 
>   /branches/11/main/app.c 426569 
>   /branches/11/apps/app_voicemail.c 426569 
> 
> Diff: https://reviewboard.asterisk.org/r/4138/diff/
> 
> 
> Testing
> -------
> 
> tests/apps/voicemail/check_voicemail_forward_with_prepend/ no longer leaks.
> 
> 
> Thanks,
> 
> Corey Farrell
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20141031/5caee92c/attachment.html>


More information about the asterisk-dev mailing list