<p>Corey Farrell has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/7639">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">app_voicemail: Fix memory management issues.<br><br>* mwi_sub_event_cb: mwist leaked on separate_mailbox failure.<br>* add_email_attachment: A reference to sox_gain_tmpdir was used<br> after the storage was out of scope.<br><br>Change-Id: I6282c542ff7b82fa091177a912d11234a8b00a30<br>---<br>M apps/app_voicemail.c<br>1 file changed, 2 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/39/7639/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c<br>index d017301..01111a1 100644<br>--- a/apps/app_voicemail.c<br>+++ b/apps/app_voicemail.c<br>@@ -5371,6 +5371,7 @@<br> 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)<br> {<br> char fname[PATH_MAX] = "";<br>+ char sox_gain_tmpdir[PATH_MAX];<br> char *file_to_delete = NULL, *dir_to_delete = NULL;<br> int res;<br> <br>@@ -5380,7 +5381,6 @@<br> /* This 'while' loop will only execute once. We use it so that we can 'break' */<br> while (vmu->volgain < -.001 || vmu->volgain > .001) {<br> char tmpdir[PATH_MAX];<br>- char sox_gain_tmpdir[PATH_MAX];<br> <br> create_dirpath(tmpdir, sizeof(tmpdir), vmu->context, vmu->mailbox, "tmp");<br> <br>@@ -13148,6 +13148,7 @@<br> }<br> <br> if (separate_mailbox(ast_strdupa(stasis_topic_name(change->topic)), &mailbox, &context)) {<br>+ ast_free(mwist);<br> return;<br> }<br> <br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/7639">change 7639</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/7639"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 15 </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I6282c542ff7b82fa091177a912d11234a8b00a30 </div>
<div style="display:none"> Gerrit-Change-Number: 7639 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Corey Farrell <git@cfware.com> </div>