# HG changeset patch # User Timo Sirainen # Date 1103146713 -7200 # Node ID 10d1fd8d08655c681a9284cbedafc1327bff3614 # Parent 982e7432276f34efabb86ec1b601675b4617adc7 Deinitialize pending command only if it's actually executing. Fixes crash if client disconnected while command was only half sent. diff -r 982e7432276f -r 10d1fd8d0865 src/imap/client.c --- a/src/imap/client.c Wed Dec 15 23:31:53 2004 +0200 +++ b/src/imap/client.c Wed Dec 15 23:38:33 2004 +0200 @@ -58,7 +58,7 @@ { int ret; - if (client->cmd_func != NULL) { + if (client->command_pending) { /* try to deinitialize the command */ i_stream_close(client->input); o_stream_close(client->output);