/*
- * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
# endif
#endif
+DEFINE_STACK_OF(BIO)
+
#ifndef S_ISDIR
# define S_ISDIR(a) (((a) & S_IFMT) == S_IFDIR)
#endif
if (conf == NULL)
return 0;
+ memset(conf, 0, sizeof(*conf));
conf->meth = &default_method;
conf->meth_data = (void *)CONF_type_default;
- conf->data = NULL;
return 1;
}
if (conf == NULL)
return 0;
+ memset(conf, 0, sizeof(*conf));
conf->meth = &WIN32_method;
conf->meth_data = (void *)CONF_type_win32;
- conf->data = NULL;
return 1;
}
OPENSSL_strlcpy(include_path, include_dir, newlen);
OPENSSL_strlcat(include_path, "/", newlen);
OPENSSL_strlcat(include_path, include, newlen);
+ OPENSSL_free(include);
} else {
include_path = include;
}
next = process_include(include_path, &dirctx, &dirpath);
if (include_path != dirpath) {
/* dirpath will contain include in case of a directory */
- OPENSSL_free(include);
- if (include_path != include)
- OPENSSL_free(include_path);
+ OPENSSL_free(include_path);
}
#else
next = BIO_new_file(include_path, "r");
- OPENSSL_free(include);
- if (include_path != include)
- OPENSSL_free(include_path);
+ OPENSSL_free(include_path);
#endif
if (next != NULL) {