dovecot-2.1: stats: Don't assert-crash at exit if there are unfi...

dovecot at dovecot.org dovecot at dovecot.org
Sun Sep 4 11:30:18 EEST 2011


details:   http://hg.dovecot.org/dovecot-2.1/rev/ddcf7d2f109a
changeset: 13371:ddcf7d2f109a
user:      Timo Sirainen <tss at iki.fi>
date:      Sun Sep 04 10:12:30 2011 +0300
description:
stats: Don't assert-crash at exit if there are unfinished commands.

diffstat:

 src/stats/mail-command.c |  7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diffs (16 lines):

diff -r d2b27eae9221 -r ddcf7d2f109a src/stats/mail-command.c
--- a/src/stats/mail-command.c	Sat Sep 03 12:04:56 2011 +0300
+++ b/src/stats/mail-command.c	Sun Sep 04 10:12:30 2011 +0300
@@ -173,6 +173,11 @@
 
 void mail_commands_deinit(void)
 {
-	while (stable_mail_commands != NULL)
+	while (stable_mail_commands != NULL) {
+		struct mail_command *cmd = stable_mail_commands;
+
+		if (cmd->id != 0)
+			mail_command_unref(&cmd);
 		mail_command_free(stable_mail_commands);
+	}
 }


More information about the dovecot-cvs mailing list