]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: test_mail_storage_deinit() - Don't try to clear freed memory
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Mon, 7 Dec 2020 10:40:22 +0000 (12:40 +0200)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Mon, 7 Dec 2020 11:11:59 +0000 (11:11 +0000)
ctx was already freed. Trying to memset() into it will just result in
writing to already freed memory.

src/lib-storage/test-mail-storage-common.c

index dc93e94bf339b54799c8d8bae8e92d7ea5525729..6c77ec1c02999789d062daba7a4b87fde2b39daf 100644 (file)
@@ -57,8 +57,6 @@ void test_mail_storage_deinit(struct test_mail_storage_ctx **_ctx)
        io_loop_destroy(&ctx->ioloop);
 
        pool_unref(&ctx->pool);
-
-       i_zero(ctx);
 }
 
 void test_mail_storage_init_user(struct test_mail_storage_ctx *ctx,