From dd04101f6001f9c72548b7be67d1ae8b484a0718 Mon Sep 17 00:00:00 2001 From: Joshua Colp Date: Wed, 10 Oct 2007 14:17:08 +0000 Subject: [PATCH] Merged revisions 85242 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r85242 | file | 2007-10-10 11:14:56 -0300 (Wed, 10 Oct 2007) | 6 lines Close voicemail message description file if duration did not meet the minimum, or else we will eventually run out of file descriptors. (closes issue #10918) Reported by: brak2718 Patches: vm1.4.12.1.patch uploaded by brak2718 (license 279) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@85254 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- apps/app_voicemail.c | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index c4dd7fd27b..4fcaa230b6 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);