]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: mail_get_binary_stream() - Add comment about having to unref returned...
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Fri, 24 Sep 2021 14:33:38 +0000 (17:33 +0300)
committertimo.sirainen <timo.sirainen@open-xchange.com>
Mon, 27 Sep 2021 22:30:24 +0000 (22:30 +0000)
src/lib-storage/mail-storage.h

index 771f18ad52c51c00f606de59b1326ba1dd30734e..25a98b269eee3d0a8d295ea908b9255efbfdf385 100644 (file)
@@ -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);