summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorRich Salz <rsalz@openssl.org>2015-05-01 10:15:18 -0400
committerRich Salz <rsalz@openssl.org>2015-05-01 10:15:18 -0400
commitefa7dd64443f246004751bdaa5671bf6836e07ff (patch)
treedf55d807a97d046ce17eb12adca78ea36a6038fa /apps
parentb548a1f11c06ccdfa4f52a539912d22d77ee309e (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 'apps')
-rw-r--r--apps/apps.c3
-rw-r--r--apps/req.c3
2 files changed, 2 insertions, 4 deletions
diff --git a/apps/apps.c b/apps/apps.c
index 46cc5a05e7..f2a17a4633 100644
--- a/apps/apps.c
+++ b/apps/apps.c
@@ -1612,8 +1612,7 @@ CA_DB *load_index(char *dbfile, DB_ATTR *db_attr)
}
err:
- if (dbattr_conf)
- NCONF_free(dbattr_conf);
+ NCONF_free(dbattr_conf);
TXT_DB_free(tmpdb);
BIO_free_all(in);
return retdb;
diff --git a/apps/req.c b/apps/req.c
index 4ff3b246fe..e8e18ecdde 100644
--- a/apps/req.c
+++ b/apps/req.c
@@ -883,8 +883,7 @@ int req_main(int argc, char **argv)
if (sigopts)
sk_OPENSSL_STRING_free(sigopts);
#ifndef OPENSSL_NO_ENGINE
- if (gen_eng)
- ENGINE_free(gen_eng);
+ ENGINE_free(gen_eng);
#endif
OPENSSL_free(keyalgstr);
X509_REQ_free(req);