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 /engines | |
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 'engines')
-rw-r--r-- | engines/e_4758cca.c | 3 | ||||
-rw-r--r-- | engines/e_aep.c | 3 | ||||
-rw-r--r-- | engines/e_atalla.c | 3 | ||||
-rw-r--r-- | engines/e_chil.c | 3 | ||||
-rw-r--r-- | engines/e_cswift.c | 6 | ||||
-rw-r--r-- | engines/e_sureware.c | 3 | ||||
-rw-r--r-- | engines/e_ubsec.c | 3 |
7 files changed, 8 insertions, 16 deletions
diff --git a/engines/e_4758cca.c b/engines/e_4758cca.c index 9c98129d98..e592cfb611 100644 --- a/engines/e_4758cca.c +++ b/engines/e_4758cca.c @@ -324,8 +324,7 @@ static int ibm_4758_cca_init(ENGINE *e) return 1; err: - if (dso) - DSO_free(dso); + DSO_free(dso); dso = NULL; # ifndef OPENSSL_NO_RSA diff --git a/engines/e_aep.c b/engines/e_aep.c index c86b34adbb..8a47f7d057 100644 --- a/engines/e_aep.c +++ b/engines/e_aep.c @@ -501,8 +501,7 @@ static int aep_init(ENGINE *e) err: - if (aep_dso) - DSO_free(aep_dso); + DSO_free(aep_dso); aep_dso = NULL; p_AEP_OpenConnection = NULL; diff --git a/engines/e_atalla.c b/engines/e_atalla.c index e9a6134871..278cff427a 100644 --- a/engines/e_atalla.c +++ b/engines/e_atalla.c @@ -406,8 +406,7 @@ static int atalla_init(ENGINE *e) /* Everything's fine. */ return 1; err: - if (atalla_dso) - DSO_free(atalla_dso); + DSO_free(atalla_dso); atalla_dso = NULL; p_Atalla_GetHardwareConfig = NULL; p_Atalla_RSAPrivateKeyOpFn = NULL; diff --git a/engines/e_chil.c b/engines/e_chil.c index 35352140af..75c15f69e2 100644 --- a/engines/e_chil.c +++ b/engines/e_chil.c @@ -622,8 +622,7 @@ static int hwcrhk_init(ENGINE *e) # endif return 1; err: - if (hwcrhk_dso) - DSO_free(hwcrhk_dso); + DSO_free(hwcrhk_dso); hwcrhk_dso = NULL; p_hwcrhk_Init = NULL; p_hwcrhk_Finish = NULL; diff --git a/engines/e_cswift.c b/engines/e_cswift.c index 0b4bfc503e..5dcee7cdc7 100644 --- a/engines/e_cswift.c +++ b/engines/e_cswift.c @@ -431,10 +431,8 @@ static int cswift_init(ENGINE *e) /* Everything's fine. */ return 1; err: - if (cswift_dso) { - DSO_free(cswift_dso); - cswift_dso = NULL; - } + DSO_free(cswift_dso); + cswift_dso = NULL; p_CSwift_AcquireAccContext = NULL; p_CSwift_AttachKeyParam = NULL; p_CSwift_SimpleRequest = NULL; diff --git a/engines/e_sureware.c b/engines/e_sureware.c index 9e56a7d28e..7d8c147db7 100644 --- a/engines/e_sureware.c +++ b/engines/e_sureware.c @@ -560,8 +560,7 @@ static int surewarehk_init(ENGINE *e) return 1; err: - if (surewarehk_dso) - DSO_free(surewarehk_dso); + DSO_free(surewarehk_dso); surewarehk_dso = NULL; p_surewarehk_Init = NULL; p_surewarehk_Finish = NULL; diff --git a/engines/e_ubsec.c b/engines/e_ubsec.c index c7eb892cf4..a44b0b2b4a 100644 --- a/engines/e_ubsec.c +++ b/engines/e_ubsec.c @@ -481,8 +481,7 @@ static int ubsec_init(ENGINE *e) } err: - if (ubsec_dso) - DSO_free(ubsec_dso); + DSO_free(ubsec_dso); ubsec_dso = NULL; p_UBSEC_ubsec_bytes_to_bits = NULL; p_UBSEC_ubsec_bits_to_bytes = NULL; |