diff options
author | Rich Salz <rsalz@akamai.com> | 2015-03-24 10:17:37 -0400 |
---|---|---|
committer | Rich Salz <rsalz@akamai.com> | 2015-03-24 23:17:16 -0400 |
commit | d64070838ebba86f00fb3755df5d3e65106e1628 (patch) | |
tree | def90b3063d9ebe0f53920604d02b9786216e327 /crypto/dh/dh_lib.c | |
parent | 1300705a47b9c9498b15a384c6c5348adc342e2c (diff) |
free NULL cleanup
Start ensuring all OpenSSL "free" routines allow NULL, and remove
any if check before calling them.
This gets DH_free, DSA_free, RSA_free
Reviewed-by: Matt Caswell <matt@openssl.org>
Diffstat (limited to 'crypto/dh/dh_lib.c')
-rw-r--r-- | crypto/dh/dh_lib.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/dh/dh_lib.c b/crypto/dh/dh_lib.c index 46d1a2b7b9..4f07a277ea 100644 --- a/crypto/dh/dh_lib.c +++ b/crypto/dh/dh_lib.c @@ -170,6 +170,7 @@ DH *DH_new_method(ENGINE *engine) void DH_free(DH *r) { int i; + if (r == NULL) return; i = CRYPTO_add(&r->references, -1, CRYPTO_LOCK_DH); |