]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: mailbox_header_lookup_unref(NULL) should be a no-op
authorJosef 'Jeff' Sipek <jeff.sipek@dovecot.fi>
Mon, 29 Jan 2018 13:40:27 +0000 (08:40 -0500)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 12 Mar 2018 09:58:54 +0000 (11:58 +0200)
src/lib-storage/mailbox-header.c

index 2def864985e8a13a30486109afccff687243d6f9..434e4191af6dd492b8ec015bf7dc173e4f796ac3 100644 (file)
@@ -79,6 +79,9 @@ void mailbox_header_lookup_unref(struct mailbox_header_lookup_ctx **_ctx)
 {
        struct mailbox_header_lookup_ctx *ctx = *_ctx;
 
+       if (ctx == NULL)
+               return;
+
        *_ctx = NULL;
 
        i_assert(ctx->refcount > 0);