]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Fixed potential file descriptor leaks
authorTimo Sirainen <tss@iki.fi>
Tue, 23 Sep 2003 13:41:31 +0000 (16:41 +0300)
committerTimo Sirainen <tss@iki.fi>
Tue, 23 Sep 2003 13:41:31 +0000 (16:41 +0300)
--HG--
branch : HEAD

src/lib-index/mail-index-open.c

index de946d76b79cd0229b28ceafe817169b3a3caeef..f66b67e81bbcc4c1be6ab4eccd5a7bb6bfac3306 100644 (file)
@@ -346,18 +346,8 @@ static int mail_index_open_index(struct mail_index *index,
                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;