Skip to content

Commit

Permalink
Clear some sslapitest global variables after use
Browse files Browse the repository at this point in the history
Otherwise we get a use after free if the test order is randomised.

Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from openssl/openssl#5467)
  • Loading branch information
mattcaswell committed Feb 26, 2018
1 parent 5839185 commit 34ff74e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions test/sslapitest.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 34ff74e

Please sign in to comment.