diff options
author | Rich Salz <rsalz@openssl.org> | 2015-05-01 10:15:18 -0400 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2015-05-01 10:15:18 -0400 |
commit | efa7dd64443f246004751bdaa5671bf6836e07ff (patch) | |
tree | df55d807a97d046ce17eb12adca78ea36a6038fa /crypto/err | |
parent | b548a1f11c06ccdfa4f52a539912d22d77ee309e (diff) |
free NULL cleanup 11
Don't check for NULL before calling free functions. This gets:
ERR_STATE_free
ENGINE_free
DSO_free
CMAC_CTX_free
COMP_CTX_free
CONF_free
NCONF_free NCONF_free_data _CONF_free_data
A sk_free use within OBJ_sigid_free
TS_TST_INFO_free (rest of TS_ API was okay)
Doc update for UI_free (all uses were fine)
X509V3_conf_free
X509V3_section_free
X509V3_string_free
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto/err')
-rw-r--r-- | crypto/err/err.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/crypto/err/err.c b/crypto/err/err.c index 9d58f38144..308504a8ed 100644 --- a/crypto/err/err.c +++ b/crypto/err/err.c @@ -409,8 +409,7 @@ static void int_thread_del_item(const ERR_STATE *d) CRYPTO_w_unlock(CRYPTO_LOCK_ERR); int_thread_release(&hash); - if (p) - ERR_STATE_free(p); + ERR_STATE_free(p); } #ifndef OPENSSL_NO_ERR @@ -905,8 +904,7 @@ ERR_STATE *ERR_get_state(void) * If a race occurred in this function and we came second, tmpp is * the first one that we just replaced. */ - if (tmpp) - ERR_STATE_free(tmpp); + ERR_STATE_free(tmpp); } return ret; } |