Mercurial > dovecot > original-hg > dovecot-1.2
changeset 4053:94b3363165c8 HEAD
If transaction log opening fails, don't crash when trying to move it to
memory.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Fri, 24 Feb 2006 14:26:21 +0200 |
parents | ba8185cce4d4 |
children | f83d7d14b999 |
files | src/lib-index/mail-index.c |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-index/mail-index.c Fri Feb 24 14:25:58 2006 +0200 +++ b/src/lib-index/mail-index.c Fri Feb 24 14:26:21 2006 +0200 @@ -1759,9 +1759,11 @@ index->map = map; index->hdr = &map->hdr; - /* move transaction log to memory */ - if (mail_transaction_log_move_to_memory(index->log) < 0) - ret = -1; + if (index->log != NULL) { + /* move transaction log to memory */ + if (mail_transaction_log_move_to_memory(index->log) < 0) + ret = -1; + } /* close the index file. */ if (close(index->fd) < 0)