From: Timo Sirainen Date: Sat, 15 Sep 2012 18:00:54 +0000 (+0300) Subject: lib-imap-storage: imap_msgpart_bodypartstructure() returned freed data. X-Git-Tag: 2.2.alpha1~193 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=109de6bdee93ccc813d454db3c41e1bc004f6aee;p=thirdparty%2Fdovecot%2Fcore.git lib-imap-storage: imap_msgpart_bodypartstructure() returned freed data. --- diff --git a/src/lib-imap-storage/imap-msgpart.c b/src/lib-imap-storage/imap-msgpart.c index b479b08f42..9d41e761b6 100644 --- a/src/lib-imap-storage/imap-msgpart.c +++ b/src/lib-imap-storage/imap-msgpart.c @@ -815,16 +815,14 @@ int imap_msgpart_bodypartstructure(struct mail *mail, if (part == NULL) part = all_parts; - T_BEGIN { - if (msgpart->decode_cte_to_binary) - ret = imap_msgpart_vsizes_to_binary(mail, part, &part); - - if (ret >= 0) { - bpstruct = t_str_new(256); - imap_bodystructure_write(part, bpstruct, TRUE); - *bpstruct_r = str_c(bpstruct); - } - } T_END; + if (msgpart->decode_cte_to_binary) + ret = imap_msgpart_vsizes_to_binary(mail, part, &part); + + if (ret >= 0) { + bpstruct = t_str_new(256); + imap_bodystructure_write(part, bpstruct, TRUE); + *bpstruct_r = str_c(bpstruct); + } return ret < 0 ? -1 : 1; }