From: Mikhail Gusarov Date: Tue, 17 Nov 2009 15:28:37 +0000 (+0600) Subject: Close message file after parsing message headers X-Git-Tag: 0.1~480 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=dc5a9d8eb2c3d120fb9bf8fa9f0f22764a169b77;p=notmuch.git Close message file after parsing message headers Keeping unused files open helps to see "Too many open files" often. Signed-off-by: Mikhail Gusarov --- diff --git a/lib/message-file.c b/lib/message-file.c index 8a3f8ee0..197ab014 100644 --- a/lib/message-file.c +++ b/lib/message-file.c @@ -325,6 +325,11 @@ notmuch_message_file_get_header (notmuch_message_file_t *message, return decoded_value; } + if (message->parsing_finished) { + fclose (message->file); + message->file = NULL; + } + if (message->line) free (message->line); message->line = NULL;