diff options
author | Bernd Edlinger <bernd.edlinger@hotmail.de> | 2023-09-06 14:06:52 +0200 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2023-09-08 09:20:23 +0200 |
commit | 68e95f7840d0d8ac4e5e03381cf9d305578dd1c7 (patch) | |
tree | 78b88d332ae2ed4a6bdb66f3e0776eb1b5050b25 /crypto/srp | |
parent | 17dd9a2c6262c00800301fddd9441a9c590a630e (diff) |
Fix a possible memleak in SRP_VBASE_new
In the error handling case the memory in
vb->users_pwd was accidentally not released.
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21981)
Diffstat (limited to 'crypto/srp')
-rw-r--r-- | crypto/srp/srp_vfy.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/srp/srp_vfy.c b/crypto/srp/srp_vfy.c index 72ef5e814e..2ca515396b 100644 --- a/crypto/srp/srp_vfy.c +++ b/crypto/srp/srp_vfy.c @@ -281,6 +281,7 @@ SRP_VBASE *SRP_VBASE_new(char *seed_key) return NULL; if ((vb->users_pwd = sk_SRP_user_pwd_new_null()) == NULL || (vb->gN_cache = sk_SRP_gN_cache_new_null()) == NULL) { + sk_SRP_user_pwd_free(vb->users_pwd); OPENSSL_free(vb); return NULL; } |