dovecot-2.0: Fixed using freed memory when opening mailboxes.

dovecot at dovecot.org dovecot at dovecot.org
Tue Jun 16 00:35:36 EEST 2009


details:   http://hg.dovecot.org/dovecot-2.0/rev/c0dd791aaaaa
changeset: 9470:c0dd791aaaaa
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Jun 15 17:35:28 2009 -0400
description:
Fixed using freed memory when opening mailboxes.

diffstat:

1 file changed, 1 insertion(+), 1 deletion(-)
src/lib-storage/index/index-storage.c |    2 +-

diffs (12 lines):

diff -r 7a63279e95ba -r c0dd791aaaaa src/lib-storage/index/index-storage.c
--- a/src/lib-storage/index/index-storage.c	Mon Jun 15 16:10:26 2009 -0400
+++ b/src/lib-storage/index/index-storage.c	Mon Jun 15 17:35:28 2009 -0400
@@ -186,7 +186,7 @@ index_storage_alloc(struct mailbox_list 
 				match = rec;
 		}
 
-		if (rec->refcount == 0) {
+		if (rec->refcount == 0 && rec != match) {
 			if (rec->destroy_time <= ioloop_time ||
 			    destroy_count >= INDEX_CACHE_MAX) {
 				*indexp = rec->next;


More information about the dovecot-cvs mailing list