{
struct imap_client *imap_client = (struct imap_client *)client;
+ /* Prevent memory leak of ID command if client got disconnected before
+ command was finished. */
+ if (imap_client->cmd_id != NULL) {
+ i_assert(!imap_client->cmd_finished);
+ cmd_id_free(imap_client);
+ }
+
i_free_and_null(imap_client->proxy_backend_capability);
imap_parser_unref(&imap_client->parser);
}
client_send_reply(&client->common, IMAP_CMD_REPLY_OK, msg);
}
-static void cmd_id_free(struct imap_client *client)
+void cmd_id_free(struct imap_client *client)
{
struct imap_client_cmd_id *id = client->cmd_id;