dovecot-2.2: lib-imap-storage: imap_msgpart_bodypartstructure() ...

dovecot at dovecot.org dovecot at dovecot.org
Sat Sep 15 21:01:04 EEST 2012


details:   http://hg.dovecot.org/dovecot-2.2/rev/1b4ab06fa0e2
changeset: 15065:1b4ab06fa0e2
user:      Timo Sirainen <tss at iki.fi>
date:      Sat Sep 15 21:00:54 2012 +0300
description:
lib-imap-storage: imap_msgpart_bodypartstructure() returned freed data.

diffstat:

 src/lib-imap-storage/imap-msgpart.c |  16 +++++++---------
 1 files changed, 7 insertions(+), 9 deletions(-)

diffs (27 lines):

diff -r 5f483950b733 -r 1b4ab06fa0e2 src/lib-imap-storage/imap-msgpart.c
--- a/src/lib-imap-storage/imap-msgpart.c	Sat Sep 15 19:56:47 2012 +0300
+++ b/src/lib-imap-storage/imap-msgpart.c	Sat Sep 15 21:00:54 2012 +0300
@@ -815,16 +815,14 @@
 	if (part == NULL)
 		part = all_parts;
 
-	T_BEGIN {
-		if (msgpart->decode_cte_to_binary)
-			ret = imap_msgpart_vsizes_to_binary(mail, part, &part);
+	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 (ret >= 0) {
+		bpstruct = t_str_new(256);
+		imap_bodystructure_write(part, bpstruct, TRUE);
+		*bpstruct_r = str_c(bpstruct);
+	}
 	return ret < 0 ? -1 : 1;
 }
 


More information about the dovecot-cvs mailing list