From 1de2ad48bd66e55c7f2b8f0f10c106a4b71ec99d Mon Sep 17 00:00:00 2001 From: effbiae Date: Wed, 15 Oct 2025 17:43:53 +1100 Subject: [PATCH] wc_FreeRng called multiple times in wolfSSL_CTX_set_srp_password --- src/ssl.c | 3 --- 1 file changed, 3 deletions(-) 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);