summaryrefslogtreecommitdiff
path: root/apps/app_minivm.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/app_minivm.c')
-rw-r--r--apps/app_minivm.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/app_minivm.c b/apps/app_minivm.c
index 3e5058067..9148ee130 100644
--- a/apps/app_minivm.c
+++ b/apps/app_minivm.c
@@ -1254,8 +1254,9 @@ static int sendmail(struct minivm_template *template, struct minivm_account *vmu
ast_safe_system(tmp2);
ast_debug(1, "Sent message to %s with command '%s' - %s\n", vmu->email, global_mailcmd, template->attachment ? "(media attachment)" : "");
ast_debug(3, "Actual command used: %s\n", tmp2);
- if (ast)
- ast_channel_free(ast);
+ if (ast) {
+ ast = ast_channel_release(ast);
+ }
return 0;
}