[asterisk-dev] [Code Review] 4138: main/app.c, app_voicemail: Fix ast_writestream leaks
Corey Farrell
reviewboard at asterisk.org
Fri Oct 31 12:03:29 CDT 2014
> On Oct. 31, 2014, 12:58 p.m., Mark Michelson wrote:
> > /branches/1.8/apps/app_voicemail.c, line 5800
> > <https://reviewboard.asterisk.org/r/4138/diff/1/?file=68670#file68670line5800>
> >
> > My assumption here is that you initially created this patch for 11, 12, or 13, and then backported to 1.8. This line doesn't fit in 1.8 because recording_fs does not exist there. The problem is, I don't know where in the 11+ code this ast_closestream() call is supposed to be.
Well that's embarrassing. In 11+ this is needed in msg_create_from_file(), line 6023 in 11.
- Corey
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4138/#review13647
-----------------------------------------------------------
On Oct. 31, 2014, 1:26 a.m., Corey Farrell wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/4138/
> -----------------------------------------------------------
>
> (Updated Oct. 31, 2014, 1:26 a.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/1.8/main/app.c 426829
> /branches/1.8/apps/app_voicemail.c 426829
>
> 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/dd41ab40/attachment.html>
More information about the asterisk-dev
mailing list