dovecot-2.1: stats: Don't crash at deinit if there are still con...
dovecot at dovecot.org
dovecot at dovecot.org
Mon Sep 5 11:34:55 EEST 2011
details: http://hg.dovecot.org/dovecot-2.1/rev/361aafbd448c
changeset: 13398:361aafbd448c
user: Timo Sirainen <tss at iki.fi>
date: Mon Sep 05 11:34:43 2011 +0300
description:
stats: Don't crash at deinit if there are still connected sessions.
diffstat:
src/stats/mail-session.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diffs (17 lines):
diff -r 7669b0fbada5 -r 361aafbd448c src/stats/mail-session.c
--- a/src/stats/mail-session.c Mon Sep 05 11:13:12 2011 +0300
+++ b/src/stats/mail-session.c Mon Sep 05 11:34:43 2011 +0300
@@ -247,7 +247,12 @@
void mail_sessions_deinit(void)
{
- while (mail_sessions_head != NULL)
+ while (mail_sessions_head != NULL) {
+ struct mail_session *session = mail_sessions_head;
+
+ if (!session->disconnected)
+ mail_session_unref(&session);
mail_session_free(mail_sessions_head);
+ }
hash_table_destroy(&mail_sessions_hash);
}
More information about the dovecot-cvs
mailing list