From: Timo Sirainen Date: Sun, 15 Jun 2003 02:20:12 +0000 (+0300) Subject: Make sure we unlock index before unreferencing it, since it's not actually X-Git-Tag: 1.1.alpha1~4557 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=83befbf24132d0c5780605652a8c2c3f0d35a62d;p=thirdparty%2Fdovecot%2Fcore.git Make sure we unlock index before unreferencing it, since it's not actually closed at that time --HG-- branch : HEAD --- diff --git a/src/lib-storage/index/index-storage.c b/src/lib-storage/index/index-storage.c index 21fa976a57..32dbf3ac8f 100644 --- a/src/lib-storage/index/index-storage.c +++ b/src/lib-storage/index/index-storage.c @@ -335,6 +335,9 @@ int index_storage_close(struct mailbox *box) { struct index_mailbox *ibox = (struct index_mailbox *) box; + /* make sure we're unlocked */ + (void)ibox->index->set_lock(ibox->index, MAIL_LOCK_UNLOCK); + index_mailbox_check_remove_all(ibox); if (ibox->index != NULL) index_storage_unref(ibox->index);