diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-10-10 14:14:56 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-10-10 14:14:56 +0000 |
commit | 648586f291ae1646c30b75bd586f680903076d4f (patch) | |
tree | 6154a2c5a700ddb146f3587561f77101c3fa2031 /apps | |
parent | 7b04f3744a3387502319b093f0a9efc58c1b01a4 (diff) |
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
Diffstat (limited to 'apps')
-rw-r--r-- | apps/app_voicemail.c | 1 |
1 files changed, 1 insertions, 0 deletions
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); |