From: Matt Caswell Date: Mon, 26 Feb 2018 19:34:42 +0000 (+0000) Subject: Clear some sslapitest global variables after use X-Git-Tag: OpenSSL_1_1_1-pre2~2 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=34ff74eb183519ccedf11c97e754450469707951;p=oweals%2Fopenssl.git Clear some sslapitest global variables after use Otherwise we get a use after free if the test order is randomised. Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/5467) --- diff --git a/test/sslapitest.c b/test/sslapitest.c index 1cf5c4fc6c..6480885fcd 100644 --- a/test/sslapitest.c +++ b/test/sslapitest.c @@ -3227,6 +3227,7 @@ static int test_export_key_mat_early(int idx) SSL_SESSION_free(sess); SSL_SESSION_free(clientpsk); SSL_SESSION_free(serverpsk); + clientpsk = serverpsk = NULL; SSL_free(serverssl); SSL_free(clientssl); SSL_CTX_free(sctx);