diff options
author | Kinichiro Inoguchi <inoguchi@cvs.openbsd.org> | 2020-01-04 13:57:44 +0000 |
---|---|---|
committer | Kinichiro Inoguchi <inoguchi@cvs.openbsd.org> | 2020-01-04 13:57:44 +0000 |
commit | 55d48f48069af0bfd78b9bba305bd0306c43da2d (patch) | |
tree | e9dd165112d7fd14afe4ee10115fec0b7f3191a2 /lib/libcrypto/dh | |
parent | 2bd32e864fa9741da0874a1ec97da9ab3c0f22d4 (diff) |
Avoid leak in error path of dh_priv_decode
ok jsing@ tb@
Diffstat (limited to 'lib/libcrypto/dh')
-rw-r--r-- | lib/libcrypto/dh/dh_ameth.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libcrypto/dh/dh_ameth.c b/lib/libcrypto/dh/dh_ameth.c index 5054d17a3f4..af15fb2c68e 100644 --- a/lib/libcrypto/dh/dh_ameth.c +++ b/lib/libcrypto/dh/dh_ameth.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dh_ameth.c,v 1.17 2018/08/24 20:22:15 tb Exp $ */ +/* $OpenBSD: dh_ameth.c,v 1.18 2020/01/04 13:57:43 inoguchi Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2006. */ @@ -225,6 +225,7 @@ dh_priv_decode(EVP_PKEY *pkey, const PKCS8_PRIV_KEY_INFO *p8) decerr: DHerror(EVP_R_DECODE_ERROR); dherr: + ASN1_INTEGER_free(privkey); DH_free(dh); return 0; } |