From: Timo Sirainen Date: Sun, 4 Sep 2011 07:12:30 +0000 (+0300) Subject: stats: Don't assert-crash at exit if there are unfinished commands. X-Git-Tag: 2.1.alpha2~101 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e736bb7394cb75b36618d68f5c3c6d63e71c7cd2;p=thirdparty%2Fdovecot%2Fcore.git stats: Don't assert-crash at exit if there are unfinished commands. --- diff --git a/src/stats/mail-command.c b/src/stats/mail-command.c index 10276937c8..609deded90 100644 --- a/src/stats/mail-command.c +++ b/src/stats/mail-command.c @@ -173,6 +173,11 @@ void mail_commands_init(void) 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); + } }