[Asterisk-code-review] app voicemail: Fix memory management issues. (asterisk[15])
Jenkins2
asteriskteam at digium.com
Tue Dec 19 09:56:21 CST 2017
Jenkins2 has submitted this change and it was merged. ( https://gerrit.asterisk.org/7639 )
Change subject: app_voicemail: Fix memory management issues.
......................................................................
app_voicemail: Fix memory management issues.
* mwi_sub_event_cb: mwist leaked on separate_mailbox failure.
* add_email_attachment: A reference to sox_gain_tmpdir was used
after the storage was out of scope.
Change-Id: I6282c542ff7b82fa091177a912d11234a8b00a30
---
M apps/app_voicemail.c
1 file changed, 2 insertions(+), 1 deletion(-)
Approvals:
Richard Mudgett: Looks good to me, but someone else must approve
George Joseph: Looks good to me, approved
Jenkins2: Approved for Submit
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index d017301..01111a1 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -5371,6 +5371,7 @@
static int add_email_attachment(FILE *p, struct ast_vm_user *vmu, char *format, char *attach, char *greeting_attachment, char *mailbox, char *bound, char *filename, int last, int msgnum)
{
char fname[PATH_MAX] = "";
+ char sox_gain_tmpdir[PATH_MAX];
char *file_to_delete = NULL, *dir_to_delete = NULL;
int res;
@@ -5380,7 +5381,6 @@
/* This 'while' loop will only execute once. We use it so that we can 'break' */
while (vmu->volgain < -.001 || vmu->volgain > .001) {
char tmpdir[PATH_MAX];
- char sox_gain_tmpdir[PATH_MAX];
create_dirpath(tmpdir, sizeof(tmpdir), vmu->context, vmu->mailbox, "tmp");
@@ -13148,6 +13148,7 @@
}
if (separate_mailbox(ast_strdupa(stasis_topic_name(change->topic)), &mailbox, &context)) {
+ ast_free(mwist);
return;
}
--
To view, visit https://gerrit.asterisk.org/7639
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 15
Gerrit-MessageType: merged
Gerrit-Change-Id: I6282c542ff7b82fa091177a912d11234a8b00a30
Gerrit-Change-Number: 7639
Gerrit-PatchSet: 1
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171219/5333f2f9/attachment.html>
More information about the asterisk-code-review
mailing list