mirror of https://github.com/openssl/openssl.git
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)
(cherry picked from commit ec9135a623)
This commit is contained in:
parent
e7d55e3b6b
commit
b115e29f02
|
|
@ -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…
Reference in New Issue