From 23a1d5e97cd543d2b8e1b01dbf0f619b2e5ce540 Mon Sep 17 00:00:00 2001 From: Rich Salz Date: Thu, 30 Apr 2015 21:37:06 -0400 Subject: free NULL cleanup 7 This gets BN_.*free: BN_BLINDING_free BN_CTX_free BN_FLG_FREE BN_GENCB_free BN_MONT_CTX_free BN_RECP_CTX_free BN_clear_free BN_free BUF_MEM_free Also fix a call to DSA_SIG_free to ccgost engine and remove some #ifdef'd dead code in engines/e_ubsec. Reviewed-by: Richard Levitte --- ssl/tls_srp.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'ssl/tls_srp.c') diff --git a/ssl/tls_srp.c b/ssl/tls_srp.c index 5d895ccab3..5445f3cbe3 100644 --- a/ssl/tls_srp.c +++ b/ssl/tls_srp.c @@ -273,14 +273,10 @@ int SSL_set_srp_server_param_pw(SSL *s, const char *user, const char *pass, return -1; s->srp_ctx.N = BN_dup(GN->N); s->srp_ctx.g = BN_dup(GN->g); - if (s->srp_ctx.v != NULL) { - BN_clear_free(s->srp_ctx.v); - s->srp_ctx.v = NULL; - } - if (s->srp_ctx.s != NULL) { - BN_clear_free(s->srp_ctx.s); - s->srp_ctx.s = NULL; - } + BN_clear_free(s->srp_ctx.v); + s->srp_ctx.v = NULL; + BN_clear_free(s->srp_ctx.s); + s->srp_ctx.s = NULL; if (!SRP_create_verifier_BN (user, pass, &s->srp_ctx.s, &s->srp_ctx.v, GN->N, GN->g)) return -1; -- cgit v1.2.3