]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-smtp: client: transaction: Make sure the transaction is finished/aborted after...
authorStephan Bosch <stephan.bosch@dovecot.fi>
Sat, 29 Sep 2018 11:19:53 +0000 (13:19 +0200)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Wed, 10 Oct 2018 09:49:07 +0000 (09:49 +0000)
Otherwise, the transaction could be dereferenced several times too often.

src/lib-smtp/smtp-client-transaction.c

index bc155160211ae5dbdf5738d56a2f4aafc42b0eb2..ad8568a24bc354ce44af7dc3c685ba04c982f74b 100644 (file)
@@ -299,6 +299,8 @@ void smtp_client_transaction_destroy(struct smtp_client_transaction **_trans)
 
        if (trans->state < SMTP_CLIENT_TRANSACTION_STATE_FINISHED) {
                struct smtp_client_transaction *trans_tmp = trans;
+
+               trans->state = SMTP_CLIENT_TRANSACTION_STATE_ABORTED;
                smtp_client_transaction_unref(&trans_tmp);
        }