]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-smtp: smtp-client-command - Assert aborted command pointer is (still) valid
authorStephan Bosch <stephan.bosch@open-xchange.com>
Sat, 21 Jun 2025 14:53:17 +0000 (16:53 +0200)
committertimo.sirainen <timo.sirainen@open-xchange.com>
Sun, 29 Jun 2025 17:22:15 +0000 (17:22 +0000)
src/lib-smtp/smtp-client-command.c

index ddeaa58057095733b6086d0260094c58ae1219b9..05757ee9d7d4c0b121856aa7813c0132c106cdbf 100644 (file)
@@ -186,6 +186,8 @@ void smtp_client_command_abort(struct smtp_client_command **_cmd)
                return;
        *_cmd = NULL;
 
+       i_assert(cmd->refcount > 0);
+
        struct smtp_client_connection *conn = cmd->conn;
        enum smtp_client_command_state state = cmd->state;
        bool disconnected =