Skip to content

Commit

Permalink
Fix a possible memleak in SRP_VBASE_new
Browse files Browse the repository at this point in the history
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 #21981)
  • Loading branch information
bernd-edlinger authored and t8m committed Sep 8, 2023
1 parent 17dd9a2 commit 68e95f7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions crypto/srp/srp_vfy.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 68e95f7

Please sign in to comment.