[dovecot-cvs] dovecot/src/plugins/trash trash-plugin.c,1.14,1.15

tss at dovecot.org tss at dovecot.org
Fri Feb 16 12:15:31 UTC 2007


Update of /var/lib/cvs/dovecot/src/plugins/trash
In directory talvi:/tmp/cvs-serv3753

Modified Files:
	trash-plugin.c 
Log Message:
If trash mailbox can't be opened, don't crash.



Index: trash-plugin.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/plugins/trash/trash-plugin.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- trash-plugin.c	25 Nov 2006 22:18:36 -0000	1.14
+++ trash-plugin.c	16 Feb 2007 12:15:28 -0000	1.15
@@ -53,6 +53,9 @@
 {
 	trash->box = mailbox_open(trash->storage, trash->name, NULL,
 				  MAILBOX_OPEN_KEEP_RECENT);
+	if (trash->box == NULL)
+		return -1;
+
 	if (sync_mailbox(trash->box) < 0)
 		return -1;
 



More information about the dovecot-cvs mailing list