diff options
author | Jenkins2 <jenkins2@gerrit.asterisk.org> | 2017-12-19 10:08:18 -0600 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2017-12-19 10:08:18 -0600 |
commit | a788e2e796272ac7ea8dac0ab2527a263d7c159d (patch) | |
tree | 9b59e8e356900a167d1748e66d15e9c4cae79c03 | |
parent | d68482fce2578dfcc7e0aaa0324238b0d1438603 (diff) | |
parent | dc04d1ec93d018b5b84a5b6a84eef9d55ec1fc9d (diff) |
Merge "app_voicemail: Fix memory management issues."
-rw-r--r-- | apps/app_voicemail.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index c155186a2..af2174ba9 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -5390,6 +5390,7 @@ plain_message: 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; @@ -5399,7 +5400,6 @@ static int add_email_attachment(FILE *p, struct ast_vm_user *vmu, char *format, /* 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"); @@ -13167,6 +13167,7 @@ static void mwi_sub_event_cb(struct stasis_subscription_change *change) } if (separate_mailbox(ast_strdupa(stasis_topic_name(change->topic)), &mailbox, &context)) { + ast_free(mwist); return; } |