Fix memory leak in DH_get_nid()
authorBenjamin Kaduk <bkaduk@akamai.com>
Thu, 12 Oct 2017 17:12:10 +0000 (12:12 -0500)
committerBenjamin Kaduk <bkaduk@akamai.com>
Thu, 12 Oct 2017 17:21:28 +0000 (12:21 -0500)
commit8abeefeccc4cfbfba9b5ebfc7604fe257a97317a
tree85c0f935d6a9ee5419e5411758c4b4b56c664021
parent141e470947327e0c4e8ef3c299b42d01064c484c
Fix memory leak in DH_get_nid()

If q is non-NULL but p is indeed a safe prime, a modified copy
of p could be leaked.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4525)
crypto/dh/dh_rfc7919.c