]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-imap-storage: imap_msgpart_bodypartstructure() returned freed data.
authorTimo Sirainen <tss@iki.fi>
Sat, 15 Sep 2012 18:00:54 +0000 (21:00 +0300)
committerTimo Sirainen <tss@iki.fi>
Sat, 15 Sep 2012 18:00:54 +0000 (21:00 +0300)
src/lib-imap-storage/imap-msgpart.c

index b479b08f426e5b159fcd54620df6bcc02e0d75c9..9d41e761b6d92bd9c5662f754636a22ab2dd6b2a 100644 (file)
@@ -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;
 }