From 5e5c866cf3cc0ab06a7c5c1607fa002d25243100 Mon Sep 17 00:00:00 2001 From: Mark Michelson <mmichelson@digium.com> Date: Thu, 13 Dec 2007 20:12:37 +0000 Subject: [PATCH] Merged revisions 92807 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r92807 | mmichelson | 2007-12-13 14:03:20 -0600 (Thu, 13 Dec 2007) | 3 lines Prevent another potential fd leak ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@92808 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 30eed55526..17fb0010db 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -2528,6 +2528,7 @@ static int imap_store_file(char *dir, char *mailboxuser, char *mailboxcontext, i rewind(p); if (!(buf = ast_malloc(len+1))) { ast_log(LOG_ERROR, "Can't allocate %ld bytes to read message\n", len+1); + fclose(p); if(tempcopy) *(vmu->email) = '\0'; return -1; -- GitLab