diff options
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/conf/conf_api.c | 7 | ||||
-rw-r--r-- | crypto/conf/conf_def.c | 1 |
2 files changed, 6 insertions, 2 deletions
diff --git a/crypto/conf/conf_api.c b/crypto/conf/conf_api.c index e4e305c714..7a4efe6dbb 100644 --- a/crypto/conf/conf_api.c +++ b/crypto/conf/conf_api.c @@ -135,7 +135,11 @@ IMPLEMENT_LHASH_DOALL_ARG_CONST(CONF_VALUE, LH_CONF_VALUE); void _CONF_free_data(CONF *conf) { - if (conf == NULL || conf->data == NULL) + if (conf == NULL) + return; + + OPENSSL_free(conf->includedir); + if (conf->data == NULL) return; /* evil thing to make sure the 'OPENSSL_free()' works as expected */ @@ -147,7 +151,6 @@ void _CONF_free_data(CONF *conf) * with */ - OPENSSL_free(conf->includedir); lh_CONF_VALUE_doall(conf->data, value_free_stack_doall); lh_CONF_VALUE_free(conf->data); } diff --git a/crypto/conf/conf_def.c b/crypto/conf/conf_def.c index 1832cf535f..c05c3c6b10 100644 --- a/crypto/conf/conf_def.c +++ b/crypto/conf/conf_def.c @@ -424,6 +424,7 @@ static int def_load_bio(CONF *conf, BIO *in, long *line) if (!parsebool(pval, &conf->flag_abspath)) goto err; } else if (strcmp(p, "includedir") == 0) { + OPENSSL_free(conf->includedir); if ((conf->includedir = OPENSSL_strdup(pval)) == NULL) { ERR_raise(ERR_LIB_CONF, ERR_R_MALLOC_FAILURE); goto err; |