[PATCH] lib/message-file: close stream in destructor
w at wdtz.org
Thu May 9 18:05:47 PDT 2019
Great, thank you!
Much appreciated, I actually was running into this yesterday.
( which for whatever reason led to posting this on the subject:
Would the valgrind support in the test suite catch this sort of thing
(fd leak on relatively common path)?
Regardless, glad to see it fixed!
On Thu, 9 May 2019 21:23:24 -0300, David Bremner <david at tethera.net> wrote:
> 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 | 3 +++
> 1 file changed, 3 insertions(+)
> The regression test could be improved, but I wanted to get a fix out
> and hopefully into master, as this is a problem that seems
> particularly likely to hit new users during their initial notmuch-new.
> 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;
> notmuch mailing list
> notmuch at notmuchmail.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 833 bytes
Desc: not available
More information about the notmuch