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>
This commit is contained in:
@@ -108,16 +108,14 @@ int engine_free_util(ENGINE *e, int locked)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (e == NULL) {
|
||||
ENGINEerr(ENGINE_F_ENGINE_FREE_UTIL, ERR_R_PASSED_NULL_PARAMETER);
|
||||
return 0;
|
||||
}
|
||||
if (e == NULL)
|
||||
return 1;
|
||||
if (locked)
|
||||
i = CRYPTO_add(&e->struct_ref, -1, CRYPTO_LOCK_ENGINE);
|
||||
else
|
||||
i = --e->struct_ref;
|
||||
engine_ref_debug(e, 0, -1)
|
||||
if (i > 0)
|
||||
if (i > 0)
|
||||
return 1;
|
||||
#ifdef REF_CHECK
|
||||
if (i < 0) {
|
||||
|
||||
Reference in New Issue
Block a user