]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib: io_loop_destroy() - Assert-crash if ioloop contet is still set
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 11 Dec 2017 23:01:33 +0000 (01:01 +0200)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Wed, 13 Dec 2017 11:04:26 +0000 (13:04 +0200)
It may be too late to try to deactivate it at that point, so it points to a
bug.

src/lib/ioloop.c

index 603855559c8114ff368b1cedcccabf2f5f0222b3..2102e829498d5579a556198a6a0331e197ce2607 100644 (file)
@@ -813,9 +813,7 @@ void io_loop_destroy(struct ioloop **_ioloop)
        if (ioloop->handler_context != NULL)
                io_loop_handler_deinit(ioloop);
 
-       if (ioloop->cur_ctx != NULL)
-               io_loop_context_deactivate(ioloop->cur_ctx);
-
+       i_assert(ioloop->cur_ctx == NULL);
        i_free(ioloop);
 }