]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
stats: Don't assert-crash at exit if there are unfinished commands.
authorTimo Sirainen <tss@iki.fi>
Sun, 4 Sep 2011 07:12:30 +0000 (10:12 +0300)
committerTimo Sirainen <tss@iki.fi>
Sun, 4 Sep 2011 07:12:30 +0000 (10:12 +0300)
src/stats/mail-command.c

index 10276937c87bf9d5177ae3e99297a0f412b91517..609deded90e09d38407c9e54f2b254e7cd12a7fc 100644 (file)
@@ -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);
+       }
 }