Clear some sslapitest global variables after use
authorMatt Caswell <matt@openssl.org>
Mon, 26 Feb 2018 19:34:42 +0000 (19:34 +0000)
committerMatt Caswell <matt@openssl.org>
Mon, 26 Feb 2018 23:13:56 +0000 (23:13 +0000)
Otherwise we get a use after free if the test order is randomised.

Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5467)

test/sslapitest.c

index 1cf5c4fc6cecddaa50f08d33295ea38c8000f917..6480885fcd49e3c45d67f83b54bd051f3d9494c9 100644 (file)
@@ -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);