]> git.notmuchmail.org Git - notmuch/commitdiff
lib/message-file: close stream in destructor
authorDavid Bremner <david@tethera.net>
Fri, 10 May 2019 00:23:24 +0000 (21:23 -0300)
committerDavid Bremner <david@tethera.net>
Fri, 10 May 2019 15:26:50 +0000 (12:26 -0300)
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.

lib/message-file.c

index 5085506700640f2f6f541dc71a8f9db306d7123c..24c5fda43b1338fb6f5c1c45a2d79e3c51005a98 100644 (file)
@@ -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;
 }