Close message file after parsing message headers

Keeping unused files open helps to see "Too many open files" often.

Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
This commit is contained in:
Mikhail Gusarov 2009-11-17 21:28:37 +06:00 committed by Carl Worth
parent 0dab6a2c1e
commit dc5a9d8eb2

View file

@ -325,6 +325,11 @@ notmuch_message_file_get_header (notmuch_message_file_t *message,
return decoded_value; return decoded_value;
} }
if (message->parsing_finished) {
fclose (message->file);
message->file = NULL;
}
if (message->line) if (message->line)
free (message->line); free (message->line);
message->line = NULL; message->line = NULL;