dovecot: Crashfix

dovecot at dovecot.org dovecot at dovecot.org
Thu Jul 19 03:37:49 EEST 2007


details:   http://hg.dovecot.org/dovecot/rev/877d861f2dd3
changeset: 6096:877d861f2dd3
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Jul 19 03:37:43 2007 +0300
description:
Crashfix

diffstat:

1 file changed, 4 insertions(+), 3 deletions(-)
src/lib-index/mailbox-list-index.c |    7 ++++---

diffs (27 lines):

diff -r b6a477859a3c -r 877d861f2dd3 src/lib-index/mailbox-list-index.c
--- a/src/lib-index/mailbox-list-index.c	Thu Jul 19 03:34:08 2007 +0300
+++ b/src/lib-index/mailbox-list-index.c	Thu Jul 19 03:37:43 2007 +0300
@@ -717,6 +717,9 @@ int mailbox_list_index_iterate_next(stru
 	str_append(ctx->name_path, name);
 	t_pop();
 
+	info_r->name = str_c(ctx->name_path);
+	info_r->uid = recs->uid;
+
 	dir_offset = mail_index_offset_to_uint32(recs->dir_offset);
 	if (dir_offset != 0 && array_count(&ctx->path) < ctx->recurse_level) {
 		/* recurse into children */
@@ -729,12 +732,10 @@ int mailbox_list_index_iterate_next(stru
 			ctx->failed = TRUE;
 			return -1;
 		}
+		recs = NULL; /* don't use anymore */
 	} else {
 		ctx->cur.pos++;
 	}
-
-	info_r->name = str_c(ctx->name_path);
-	info_r->uid = recs->uid;
 	info_r->has_children = dir_offset != 0;
 	return 1;
 }


More information about the dovecot-cvs mailing list