mirror of
https://github.com/openssl/openssl.git
synced 2025-04-24 20:51:14 +08:00
get_ecdsa_sig_rs_bytes: free value of d2i_ECDSA_SIG() before return
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/17280)
This commit is contained in:
parent
869b7dd000
commit
ec9135a623
@ -218,7 +218,7 @@ static int get_ecdsa_sig_rs_bytes(const unsigned char *sig, size_t sig_len,
|
||||
r1 = ECDSA_SIG_get0_r(sign);
|
||||
s1 = ECDSA_SIG_get0_s(sign);
|
||||
if (r1 == NULL || s1 == NULL)
|
||||
return 0;
|
||||
goto err;
|
||||
|
||||
r1_len = BN_num_bytes(r1);
|
||||
s1_len = BN_num_bytes(s1);
|
||||
@ -560,7 +560,7 @@ static int get_dsa_sig_rs_bytes(const unsigned char *sig, size_t sig_len,
|
||||
return 0;
|
||||
DSA_SIG_get0(sign, &r1, &s1);
|
||||
if (r1 == NULL || s1 == NULL)
|
||||
return 0;
|
||||
goto err;
|
||||
|
||||
r1_len = BN_num_bytes(r1);
|
||||
s1_len = BN_num_bytes(s1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user