dovecot-2.0: mailbox_open(): Don't crash if opening non-stream m...

dovecot at dovecot.org dovecot at dovecot.org
Sat Feb 13 13:49:51 EET 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/72a345621cd2
changeset: 10707:72a345621cd2
user:      Timo Sirainen <tss at iki.fi>
date:      Sat Feb 13 13:49:31 2010 +0200
description:
mailbox_open(): Don't crash if opening non-stream mailbox fails.

diffstat:

 src/lib-storage/mail-storage.c |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (13 lines):

diff -r 285465d71322 -r 72a345621cd2 src/lib-storage/mail-storage.c
--- a/src/lib-storage/mail-storage.c	Sat Feb 13 08:19:25 2010 +0200
+++ b/src/lib-storage/mail-storage.c	Sat Feb 13 13:49:31 2010 +0200
@@ -524,7 +524,8 @@
 	} T_END;
 
 	if (ret < 0) {
-		i_stream_unref(&box->input);
+		if (box->input != NULL)
+			i_stream_unref(&box->input);
 		return -1;
 	}
 


More information about the dovecot-cvs mailing list