From: Timo Sirainen Date: Tue, 24 May 2022 12:52:26 +0000 (+0300) Subject: lib-compression: istream-decompress - Copy parent stream name X-Git-Tag: 2.3.19.1~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=38b7195efec9173f7402543eeb45654603159807;p=thirdparty%2Fdovecot%2Fcore.git lib-compression: istream-decompress - Copy parent stream name This is needed, because istream-decompress doesn't actually use the parent stream as the istream parent. --- diff --git a/src/lib-compression/istream-decompress.c b/src/lib-compression/istream-decompress.c index 27a7f18b6a..2021a014f5 100644 --- a/src/lib-compression/istream-decompress.c +++ b/src/lib-compression/istream-decompress.c @@ -249,6 +249,10 @@ i_stream_create_decompress(struct istream *input, zstream->istream.istream.blocking = input->blocking; zstream->istream.istream.seekable = input->seekable; - return i_stream_create(&zstream->istream, NULL, - i_stream_get_fd(input), 0); + struct istream *ret = i_stream_create(&zstream->istream, NULL, + i_stream_get_fd(input), 0); + /* input isn't used as our parent istream, so need to copy the stream + name to preserve it. */ + i_stream_set_name(ret, i_stream_get_name(input)); + return ret; }