test/testutil/init.c, apps/openssl.c: add trace cleanup handle earlier
authorRichard Levitte <levitte@openssl.org>
Thu, 20 Jun 2019 08:38:46 +0000 (10:38 +0200)
committerRichard Levitte <levitte@openssl.org>
Thu, 20 Jun 2019 16:19:06 +0000 (18:19 +0200)
commitba4341316ce762f917f973bb4ac604062fb11724
tree85c07fed6d0a2cb1c89b2088f85c60fe3d5265d4
parent7a5f5fd32a58e6c70cc0ce05a7d7391e4968663e
test/testutil/init.c, apps/openssl.c: add trace cleanup handle earlier

It turned out that the internal trace cleanup handler was added too
late, so it would be executed before OPENSSL_cleanup().
This results in address errors, as the trace code that's executed in
OPENSSL_cleanup() itself tries to reach for data that's been freed at
that point.

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/9196)
apps/openssl.c
test/testutil/init.c