[Asterisk-code-review] app voicemail: Fix memory management issues. (asterisk[13])
Jenkins2
asteriskteam at digium.com
Tue Dec 19 09:41:26 CST 2017
Jenkins2 has submitted this change and it was merged. ( https://gerrit.asterisk.org/7640 )
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 c080bfe..4a0dacc 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -5373,6 +5373,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;
@@ -5382,7 +5383,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");
@@ -13212,6 +13212,7 @@
}
if (separate_mailbox(ast_strdupa(stasis_topic_name(change->topic)), &mailbox, &context)) {
+ ast_free(mwist);
return;
}
--
To view, visit https://gerrit.asterisk.org/7640
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: merged
Gerrit-Change-Id: I6282c542ff7b82fa091177a912d11234a8b00a30
Gerrit-Change-Number: 7640
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/52b9e355/attachment.html>
More information about the asterisk-code-review
mailing list