dovecot-2.2: imap: If command has no imap_parser, don't crash wh...
dovecot at dovecot.org
dovecot at dovecot.org
Wed Aug 19 17:50:07 UTC 2015
details: http://hg.dovecot.org/dovecot-2.2/rev/637e005a5559
changeset: 18983:637e005a5559
user: Timo Sirainen <tss at iki.fi>
date: Wed Aug 19 20:49:12 2015 +0300
description:
imap: If command has no imap_parser, don't crash when freeing the command.
All the current commands have a parser though, so this doesn't actually fix
anything.
diffstat:
src/imap/imap-client.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diffs (22 lines):
diff -r 84036f6687d5 -r 637e005a5559 src/imap/imap-client.c
--- a/src/imap/imap-client.c Wed Aug 19 16:50:10 2015 +0300
+++ b/src/imap/imap-client.c Wed Aug 19 20:49:12 2015 +0300
@@ -699,11 +699,13 @@
if (client->mailbox_change_lock == cmd)
client->mailbox_change_lock = NULL;
- if (client->free_parser == NULL) {
- imap_parser_reset(cmd->parser);
- client->free_parser = cmd->parser;
- } else if (cmd->parser != NULL) {
- imap_parser_unref(&cmd->parser);
+ if (cmd->parser != NULL) {
+ if (client->free_parser == NULL) {
+ imap_parser_reset(cmd->parser);
+ client->free_parser = cmd->parser;
+ } else {
+ imap_parser_unref(&cmd->parser);
+ }
}
client->command_queue_size--;
More information about the dovecot-cvs
mailing list