mirror of
https://github.com/asterisk/asterisk.git
synced 2026-07-28 00:10:25 -07:00
Prevent another potential fd leak
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@92807 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -2356,6 +2356,7 @@ static int imap_store_file(char *dir, char *mailboxuser, char *mailboxcontext, i
|
||||
rewind(p);
|
||||
if((buf = ast_malloc(len+1)) == NIL) {
|
||||
ast_log(LOG_ERROR, "Can't allocate %ld bytes to read message\n", len+1);
|
||||
fclose(p);
|
||||
return -1;
|
||||
}
|
||||
fread(buf, len, 1, p);
|
||||
|
||||
Reference in New Issue
Block a user