diff --git a/src/ssl.c b/src/ssl.c index 9241ae5c1..a4a9bf006 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -12848,19 +12848,16 @@ cleanup: srp_g, sizeof(srp_g)/sizeof(srp_g[0]), salt, sizeof(salt)/sizeof(salt[0])) < 0){ WOLFSSL_MSG("wc_SrpSetParam failed"); - wc_FreeRng(&rng); return WOLFSSL_FAILURE; } r = wc_SrpSetPassword(ctx->srp, (const byte*)password, (word32)XSTRLEN(password)); if (r < 0) { WOLFSSL_MSG("wc_SrpSetPassword failed."); - wc_FreeRng(&rng); return WOLFSSL_FAILURE; } XFREE(ctx->srp_password, NULL, DYNAMIC_TYPE_SRP); ctx->srp_password = NULL; - wc_FreeRng(&rng); } else { /* save password for wolfSSL_set_srp_username */ XFREE(ctx->srp_password, ctx->heap, DYNAMIC_TYPE_SRP);