From: Timo Sirainen Date: Fri, 24 Sep 2021 14:33:38 +0000 (+0300) Subject: lib-storage: mail_get_binary_stream() - Add comment about having to unref returned... X-Git-Tag: 2.3.17~37 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e399436c1519fe10af4de61e47035915b9239117;p=thirdparty%2Fdovecot%2Fcore.git lib-storage: mail_get_binary_stream() - Add comment about having to unref returned istream --- diff --git a/src/lib-storage/mail-storage.h b/src/lib-storage/mail-storage.h index 771f18ad52..25a98b269e 100644 --- a/src/lib-storage/mail-storage.h +++ b/src/lib-storage/mail-storage.h @@ -959,7 +959,8 @@ int mail_get_hdr_stream_because(struct mail *mail, /* Returns the message part's body decoded to 8bit binary. If the Content-Transfer-Encoding isn't supported, returns -1 and sets error to MAIL_ERROR_CONVERSION. If the part refers to a multipart, all of its - children are returned decoded. */ + children are returned decoded. Note that the returned stream must be + unreferenced, unlike mail_get_*stream*() which automatically free it. */ int mail_get_binary_stream(struct mail *mail, const struct message_part *part, bool include_hdr, uoff_t *size_r, bool *binary_r, struct istream **stream_r);