]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
mailbox_open(): Don't crash if opening non-stream mailbox fails.
authorTimo Sirainen <tss@iki.fi>
Sat, 13 Feb 2010 11:49:31 +0000 (13:49 +0200)
committerTimo Sirainen <tss@iki.fi>
Sat, 13 Feb 2010 11:49:31 +0000 (13:49 +0200)
--HG--
branch : HEAD

src/lib-storage/mail-storage.c

index c99e3b28abf72d2dc8541e7a82c0b829df31d033..803febba4cc7d6407ee31bafbb0876772b9dff55 100644 (file)
@@ -524,7 +524,8 @@ static int mailbox_open_full(struct mailbox *box, struct istream *input)
        } T_END;
 
        if (ret < 0) {
-               i_stream_unref(&box->input);
+               if (box->input != NULL)
+                       i_stream_unref(&box->input);
                return -1;
        }