From: David Bremner Date: Fri, 10 May 2019 00:23:24 +0000 (-0300) Subject: lib/message-file: close stream in destructor X-Git-Tag: archive/debian/0.29_rc0-1~54 X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=commitdiff_plain;h=e19954fa188e8a2a9bb4d57a235eb11490880fb9 lib/message-file: close stream in destructor Without this, $ make time-test OPTIONS=--small leads to fatal errors from too many open files. Thanks to st-gourichon-fid for bringing this problem to my attention in IRC. --- diff --git a/lib/message-file.c b/lib/message-file.c index 50855067..24c5fda4 100644 --- a/lib/message-file.c +++ b/lib/message-file.c @@ -46,6 +46,9 @@ _notmuch_message_file_destructor (notmuch_message_file_t *message) if (message->message) g_object_unref (message->message); + if (message->stream) + g_object_unref (message->stream); + return 0; }