diff options
Diffstat (limited to 'gost_ctl.c')
-rw-r--r-- | gost_ctl.c | 16 |
1 files changed, 7 insertions, 9 deletions
@@ -32,11 +32,11 @@ const ENGINE_CMD_DEFN gost_cmds[] = { void gost_param_free() { int i; - for (i = 0; i <= GOST_PARAM_MAX; i++) - if (gost_params[i] != NULL) { - OPENSSL_free(gost_params[i]); - gost_params[i] = NULL; - } + + for (i = 0; i <= GOST_PARAM_MAX; i++) { + OPENSSL_free(gost_params[i]); + gost_params[i] = NULL; + } } @@ -60,8 +60,7 @@ const char *get_gost_engine_param(int param) } tmp = getenv(gost_envnames[param]); if (tmp) { - if (gost_params[param]) - OPENSSL_free(gost_params[param]); + OPENSSL_free(gost_params[param]); gost_params[param] = BUF_strdup(tmp); return gost_params[param]; } @@ -79,8 +78,7 @@ int gost_set_default_param(int param, const char *value) */ if (!tmp) tmp = value; - if (gost_params[param]) - OPENSSL_free(gost_params[param]); + OPENSSL_free(gost_params[param]); gost_params[param] = BUF_strdup(tmp); return 1; |