]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-smtp: client: Make smtp_client_transaction_unref(NULL) a no-op.
authorStephan Bosch <stephan.bosch@dovecot.fi>
Sun, 14 Oct 2018 11:45:56 +0000 (13:45 +0200)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Tue, 12 Feb 2019 13:41:14 +0000 (15:41 +0200)
src/lib-smtp/smtp-client-transaction.c

index bd683e85277eaff1ec46af76a51ba0250783a586..28e457170ddd861fce6823ca5137b4253ae582d9 100644 (file)
@@ -405,6 +405,9 @@ void smtp_client_transaction_unref(struct smtp_client_transaction **_trans)
 
        *_trans = NULL;
 
+       if (trans == NULL)
+               return;
+
        i_assert(trans->refcount > 0);
        if (--trans->refcount > 0)
                return;