Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/8318)
OSSL_METHOD_STORE *ossl_method_store_new(void)
{
- OSSL_METHOD_STORE *res = OPENSSL_zalloc(sizeof(*res));
+ OSSL_METHOD_STORE *res;
if (!RUN_ONCE(&method_store_init_flag, do_method_store_init))
return 0;
+ res = OPENSSL_zalloc(sizeof(*res));
if (res != NULL) {
if ((res->algs = ossl_sa_ALGORITHM_new()) == NULL) {
OPENSSL_free(res);