Clear some sslapitest global variables after use

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)
This commit is contained in:
Matt Caswell 2018-02-26 19:34:42 +00:00
parent 5839185cdd
commit 34ff74eb18

View 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);