static int module_init(CONF_MODULE *pmod, char *name, char *value, CONF *cnf)
	{
	int ret, init_called = 0;
	CONF_IMODULE *imod = NULL;
	imod = OPENSSL_malloc(sizeof(CONF_IMODULE));
	if (!imod)
		goto err;
	imod->pmod = pmod;
	imod->name = BUF_strdup(name);
	imod->value = BUF_strdup(value);
	imod->usr_data = NULL;
	if (!imod->name || !imod->value)
		goto memerr;
	if(pmod->init)
		{
		ret = pmod->init(imod, cnf);
		init_called = 1;
		if (ret <= 0)
			goto err;
		}
	if (initialized_modules == NULL)
		initialized_modules = sk_CONF_IMODULE_new_null();
	if (!initialized_modules)
		goto err;
	if (!sk_CONF_IMODULE_push(initialized_modules, imod))
		goto err;
	pmod->links++;
	return ret;
	err:
	CONFerr(CONF_F_MODULE_INIT, ERR_R_MALLOC_FAILURE);
	if (pmod->finish && init_called)
		pmod->finish(imod);
	memerr:
	if (imod)
		{
		if (imod->name)
			OPENSSL_free(imod->name);
		if (imod->value)
			OPENSSL_free(imod->value);
		OPENSSL_free(imod);
		}
	return -1;
	}
['static int module_init(CONF_MODULE *pmod, char *name, char *value, CONF *cnf)\n\t{\n\tint ret, init_called = 0;\n\tCONF_IMODULE *imod = NULL;\n\timod = OPENSSL_malloc(sizeof(CONF_IMODULE));\n\tif (!imod)\n\t\tgoto err;\n\timod->pmod = pmod;\n\timod->name = BUF_strdup(name);\n\timod->value = BUF_strdup(value);\n\timod->usr_data = NULL;\n\tif (!imod->name || !imod->value)\n\t\tgoto memerr;\n\tif(pmod->init)\n\t\t{\n\t\tret = pmod->init(imod, cnf);\n\t\tinit_called = 1;\n\t\tif (ret <= 0)\n\t\t\tgoto err;\n\t\t}\n\tif (initialized_modules == NULL)\n\t\tinitialized_modules = sk_CONF_IMODULE_new_null();\n\tif (!initialized_modules)\n\t\tgoto err;\n\tif (!sk_CONF_IMODULE_push(initialized_modules, imod))\n\t\tgoto err;\n\tpmod->links++;\n\treturn ret;\n\terr:\n\tCONFerr(CONF_F_MODULE_INIT, ERR_R_MALLOC_FAILURE);\n\tif (pmod->finish && init_called)\n\t\tpmod->finish(imod);\n\tmemerr:\n\tif (imod)\n\t\t{\n\t\tif (imod->name)\n\t\t\tOPENSSL_free(imod->name);\n\t\tif (imod->value)\n\t\t\tOPENSSL_free(imod->value);\n\t\tOPENSSL_free(imod);\n\t\t}\n\treturn -1;\n\t}']