Skip to content

Commit 1de2ad4

Browse files
committed
wc_FreeRng called multiple times in wolfSSL_CTX_set_srp_password
1 parent 3534fad commit 1de2ad4

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

src/ssl.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12848,19 +12848,16 @@ int wolfSSL_set_compression(WOLFSSL* ssl)
1284812848
srp_g, sizeof(srp_g)/sizeof(srp_g[0]),
1284912849
salt, sizeof(salt)/sizeof(salt[0])) < 0){
1285012850
WOLFSSL_MSG("wc_SrpSetParam failed");
12851-
wc_FreeRng(&rng);
1285212851
return WOLFSSL_FAILURE;
1285312852
}
1285412853
r = wc_SrpSetPassword(ctx->srp, (const byte*)password,
1285512854
(word32)XSTRLEN(password));
1285612855
if (r < 0) {
1285712856
WOLFSSL_MSG("wc_SrpSetPassword failed.");
12858-
wc_FreeRng(&rng);
1285912857
return WOLFSSL_FAILURE;
1286012858
}
1286112859
XFREE(ctx->srp_password, NULL, DYNAMIC_TYPE_SRP);
1286212860
ctx->srp_password = NULL;
12863-
wc_FreeRng(&rng);
1286412861
} else {
1286512862
/* save password for wolfSSL_set_srp_username */
1286612863
XFREE(ctx->srp_password, ctx->heap, DYNAMIC_TYPE_SRP);

0 commit comments

Comments
 (0)