summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ssl_old_test.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/ssl_old_test.c b/test/ssl_old_test.c
index 91c8b5b7b5..70524dee41 100644
--- a/test/ssl_old_test.c
+++ b/test/ssl_old_test.c
@@ -1525,8 +1525,10 @@ int main(int argc, char *argv[])
ERR_print_errors(bio_err);
goto end;
}
- SSL_CTX_set0_tmp_dh_pkey(s_ctx, dhpkey);
- SSL_CTX_set0_tmp_dh_pkey(s_ctx2, dhpkey);
+ if (!SSL_CTX_set0_tmp_dh_pkey(s_ctx, dhpkey))
+ EVP_PKEY_free(dhpkey);
+ if (!SSL_CTX_set0_tmp_dh_pkey(s_ctx2, dhpkey))
+ EVP_PKEY_free(dhpkey);
}
#endif