[dovecot-cvs] dovecot/src/imap cmd-select.c, 1.34,
	1.35 cmd-unselect.c, 1.5, 1.6
    cras at dovecot.org 
    cras at dovecot.org
       
    Tue Feb  8 13:16:55 EET 2005
    
        - Previous message: [dovecot-cvs] dovecot/src/auth passdb-sql.c,1.11,1.12
 
        - Next message: [dovecot-cvs] dovecot/src/lib-index Makefile.am, 1.25,
	1.26 mail-index-sync.c, 1.48,
	1.49 mail-transaction-log-private.h, 1.7,
	1.8 mail-transaction-log.c, 1.85, 1.86
 
         -  Messages sorted by: 
              [ date ]
              [ thread ]
              [ subject ]
              [ author ]
         
 
       
    
  
Update of /var/lib/cvs/dovecot/src/imap
In directory talvi:/tmp/cvs-serv27038
Modified Files:
	cmd-select.c cmd-unselect.c 
Log Message:
Don't try to access closed mailbox after the closing gives an error.
Index: cmd-select.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/cmd-select.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- cmd-select.c	5 Feb 2005 18:07:26 -0000	1.34
+++ cmd-select.c	8 Feb 2005 11:16:52 -0000	1.35
@@ -19,10 +19,10 @@
 	if (client->mailbox != NULL) {
 		box = client->mailbox;
 		client->mailbox = NULL;
-		if (mailbox_close(box) < 0) {
-			client_send_untagged_storage_error(client,
-				mailbox_get_storage(box));
-		}
+
+                storage = mailbox_get_storage(box);
+		if (mailbox_close(box) < 0)
+			client_send_untagged_storage_error(client, storage);
 	}
 
 	storage = client_find_storage(cmd, &mailbox);
Index: cmd-unselect.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/cmd-unselect.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- cmd-unselect.c	5 Feb 2005 18:07:26 -0000	1.5
+++ cmd-unselect.c	8 Feb 2005 11:16:52 -0000	1.6
@@ -7,16 +7,16 @@
 {
 	struct client *client = cmd->client;
 	struct mailbox *mailbox = client->mailbox;
+	struct mail_storage *storage;
 
 	if (!client_verify_open_mailbox(cmd))
 		return TRUE;
 
 	client->mailbox = NULL;
 
-	if (mailbox_close(mailbox) < 0) {
-		client_send_untagged_storage_error(client,
-						   mailbox_get_storage(mailbox));
-	}
+	storage = mailbox_get_storage(mailbox);
+	if (mailbox_close(mailbox) < 0)
+		client_send_untagged_storage_error(client, storage);
 
 	client_send_tagline(cmd, "OK Unselect completed.");
 	return TRUE;
    
    
        
	- Previous message: [dovecot-cvs] dovecot/src/auth passdb-sql.c,1.11,1.12
 
	- Next message: [dovecot-cvs] dovecot/src/lib-index Makefile.am, 1.25,
	1.26 mail-index-sync.c, 1.48,
	1.49 mail-transaction-log-private.h, 1.7,
	1.8 mail-transaction-log.c, 1.85, 1.86
 
         -  Messages sorted by: 
              [ date ]
              [ thread ]
              [ subject ]
              [ author ]
         
 
       
More information about the dovecot-cvs
mailing list