From 648586f291ae1646c30b75bd586f680903076d4f Mon Sep 17 00:00:00 2001 From: file Date: Wed, 10 Oct 2007 14:14:56 +0000 Subject: 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: http://svn.digium.com/svn/asterisk/branches/1.4@85242 f38db490-d61c-443f-a65b-d21fe96a405b --- apps/app_voicemail.c | 1 + 1 file changed, 1 insertion(+) (limited to 'apps') diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index fe55a5019..09f87e8af 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -3064,6 +3064,7 @@ static int leave_voicemail(struct ast_channel *chan, char *ext, struct leave_vm_ if (txt) { if (duration < vmminmessage) { + 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, vmminmessage); ast_filedelete(tmptxtfile, NULL); -- cgit v1.2.3