diff options
author | Peiwei Hu <jlu.hpw@foxmail.com> | 2021-12-15 17:46:04 +0800 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2021-12-17 08:58:42 +0100 |
commit | b115e29f02cb66f5452fc72182228071e604a794 (patch) | |
tree | 27e74ec40507eee0f4b01e9bacbc07bcb1419e05 | |
parent | e7d55e3b6b7b2ce43304b386d1c9b86e5f57fc91 (diff) |
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 ec9135a62320c861ab17f7179ebe470686360c64)
-rw-r--r-- | test/acvp_test.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/acvp_test.c b/test/acvp_test.c index d8425f0d20..bbc77d0ae6 100644 --- a/test/acvp_test.c +++ b/test/acvp_test.c @@ -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); |