Mercurial > dovecot > original-hg > dovecot-1.2
changeset 1789:e71256caeff9 HEAD
Fixed potential file descriptor leaks
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Tue, 23 Sep 2003 16:41:31 +0300 |
parents | 42d9cae286b5 |
children | b101e678e7ac |
files | src/lib-index/mail-index-open.c |
diffstat | 1 files changed, 2 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-index/mail-index-open.c Mon Sep 22 17:29:11 2003 +0300 +++ b/src/lib-index/mail-index-open.c Tue Sep 23 16:41:31 2003 +0300 @@ -346,18 +346,8 @@ index->lock_type = MAIL_LOCK_UNLOCK; } - if (!index_open_and_fix(index, flags)) { - if ((index->set_flags & MAIL_INDEX_HDR_FLAG_REBUILD) == 0 || - (flags & _MAIL_INDEX_OPEN_FLAG_CREATING) != 0) - return FALSE; - - /* needs a rebuild */ - if (!index->set_lock(index, MAIL_LOCK_UNLOCK)) - return FALSE; - - flags |= _MAIL_INDEX_OPEN_FLAG_CREATING; - return mail_index_open_index(index, flags); - } + if (!index_open_and_fix(index, flags)) + return FALSE; if (!index->set_lock(index, MAIL_LOCK_UNLOCK)) return FALSE;