]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-index: mail_transaction_log_file_free() - Assert that refcount=0
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Mon, 10 Aug 2020 17:09:41 +0000 (20:09 +0300)
committertimo.sirainen <timo.sirainen@open-xchange.com>
Mon, 23 Nov 2020 13:19:54 +0000 (13:19 +0000)
src/lib-index/mail-transaction-log-file.c

index 8111dc9a15fa00ae20ea284f889f272ee2ceb7a2..16bda9eb0246328b05a8cd290ab1534267342d45 100644 (file)
@@ -103,6 +103,7 @@ void mail_transaction_log_file_free(struct mail_transaction_log_file **_file)
        *_file = NULL;
 
        i_assert(!file->locked);
+       i_assert(file->refcount == 0);
 
        for (p = &file->log->files; *p != NULL; p = &(*p)->next) {
                if (*p == file) {