aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/app_voicemail.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index c4dd7fd27..4fcaa230b 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -3271,6 +3271,7 @@ static int leave_voicemail(struct ast_channel *chan, char *ext, struct leave_vm_
if (txt) {
if (duration < vmminsecs) {
+ fclose(txt);
if (option_verbose > 2)
ast_verbose( VERBOSE_PREFIX_3 "Recording was %d seconds long but needs to be at least %d - abandoning\n", duration, vmminsecs);
ast_filedelete(tmptxtfile, NULL);