From: Timo Sirainen Date: Mon, 14 Jun 2004 04:29:01 +0000 (+0300) Subject: Don't let index_storage_alloc() fail X-Git-Tag: 1.1.alpha1~3989 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=07837a7b1a58959542b087c0a7db97d3bff4b819;p=thirdparty%2Fdovecot%2Fcore.git Don't let index_storage_alloc() fail --HG-- branch : HEAD --- diff --git a/src/lib-storage/index/index-storage.c b/src/lib-storage/index/index-storage.c index 619e6261b6..e2dab12929 100644 --- a/src/lib-storage/index/index-storage.c +++ b/src/lib-storage/index/index-storage.c @@ -83,12 +83,8 @@ index_storage_alloc(const char *index_dir, const char *mailbox_path, struct stat st; int destroy_count; - if (index_dir != NULL) { - if (stat(index_dir, &st) < 0) - return NULL; - } else { + if (index_dir == NULL || stat(index_dir, &st) < 0) memset(&st, 0, sizeof(st)); - } /* compare index_dir inodes so we don't break even with symlinks. for in-memory indexes compare just mailbox paths */