mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-21 18:38:08 +01:00
util: unreference objects referenced by the returned stream obj
We want freeing the returned stream to also free these underlying objects. Compare tests/test-filters.c in the gmime 3.2.x source, which uses this same idiom. Thanks to James Troup for the report and the fix.
This commit is contained in:
parent
2cf38f8e1c
commit
4c5b17b10b
2 changed files with 2 additions and 1 deletions
|
@ -170,7 +170,6 @@ test_expect_equal_file EXPECTED OUTPUT
|
|||
# there are more than 200 messages in this corpus
|
||||
add_email_corpus lkml
|
||||
test_begin_subtest "new doesn't run out of file descriptors with many gzipped files"
|
||||
test_subtest_known_broken
|
||||
ulimit -n 200
|
||||
gzip --recursive ${MAIL_DIR}
|
||||
test_expect_success "notmuch new"
|
||||
|
|
|
@ -28,6 +28,8 @@ _gzfile_maybe_filter (GMimeStream *file_stream) {
|
|||
|
||||
/* ignore filter id */
|
||||
(void)g_mime_stream_filter_add ((GMimeStreamFilter *)gzstream, gzfilter);
|
||||
g_object_unref(gzfilter);
|
||||
g_object_unref(file_stream);
|
||||
return gzstream;
|
||||
} else {
|
||||
return file_stream;
|
||||
|
|
Loading…
Reference in a new issue