From efa7dd64443f246004751bdaa5671bf6836e07ff Mon Sep 17 00:00:00 2001 From: Rich Salz Date: Fri, 1 May 2015 10:15:18 -0400 Subject: 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 --- demos/engines/cluster_labs/hw_cluster_labs.c | 4 +--- demos/engines/ibmca/hw_ibmca.c | 4 +--- demos/engines/zencod/hw_zencod.c | 4 +--- 3 files changed, 3 insertions(+), 9 deletions(-) (limited to 'demos') diff --git a/demos/engines/cluster_labs/hw_cluster_labs.c b/demos/engines/cluster_labs/hw_cluster_labs.c index c58e548f16..918689c215 100644 --- a/demos/engines/cluster_labs/hw_cluster_labs.c +++ b/demos/engines/cluster_labs/hw_cluster_labs.c @@ -363,9 +363,7 @@ int cluster_labs_init(ENGINE *e) err: /* reset all pointers */ - if (cluster_labs_dso) - DSO_free(cluster_labs_dso); - + DSO_free(cluster_labs_dso); cluster_labs_dso = NULL; p_cl_engine_init = NULL; p_cl_mod_exp = NULL; diff --git a/demos/engines/ibmca/hw_ibmca.c b/demos/engines/ibmca/hw_ibmca.c index 082246f92d..820abe862e 100644 --- a/demos/engines/ibmca/hw_ibmca.c +++ b/demos/engines/ibmca/hw_ibmca.c @@ -412,9 +412,7 @@ static int ibmca_init(ENGINE *e) return 1; err: - if (ibmca_dso) - DSO_free(ibmca_dso); - + DSO_free(ibmca_dso); p_icaOpenAdapter = NULL; p_icaCloseAdapter = NULL; p_icaRsaModExpo = NULL; diff --git a/demos/engines/zencod/hw_zencod.c b/demos/engines/zencod/hw_zencod.c index 0b72217465..773674f444 100644 --- a/demos/engines/zencod/hw_zencod.c +++ b/demos/engines/zencod/hw_zencod.c @@ -623,9 +623,7 @@ static int zencod_init(ENGINE *e) return 1; err: - if (zencod_dso) { - DSO_free(zencod_dso); - } + DSO_free(zencod_dso); zencod_dso = NULL; ptr_zencod_bytes2bits = NULL; ptr_zencod_bits2bytes = NULL; -- cgit v1.2.3