changeset 3626:68ab7800d735 HEAD

Don't leak alarm() with in-memory indexes
author Timo Sirainen <tss@iki.fi>
date Fri, 30 Sep 2005 21:25:30 +0300
parents 04e62fc6230f
children c0e35566dd14
files src/lib-index/mail-index-lock.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-index/mail-index-lock.c	Thu Sep 29 07:41:48 2005 +0300
+++ b/src/lib-index/mail-index-lock.c	Fri Sep 30 21:25:30 2005 +0300
@@ -38,12 +38,12 @@
 {
 	int ret;
 
+	if (MAIL_INDEX_IS_IN_MEMORY(index))
+		return 1;
+
 	if (timeout_secs != 0)
 		alarm(MAIL_INDEX_LOCK_WAIT_TIME);
 
-	if (MAIL_INDEX_IS_IN_MEMORY(index))
-		return 1;
-
 	switch (index->lock_method) {
 	case MAIL_INDEX_LOCK_FCNTL: {
 #ifndef HAVE_FCNTL