static int module_init(CONF_MODULE *pmod, char *name, char *value,
                       const CONF *cnf)
{
    int ret = 1;
    int init_called = 0;
    CONF_IMODULE *imod = NULL;
    imod = OPENSSL_malloc(sizeof(*imod));
    if (imod == NULL)
        goto err;
    imod->pmod = pmod;
    imod->name = OPENSSL_strdup(name);
    imod->value = OPENSSL_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) {
            CONFerr(CONF_F_MODULE_INIT, ERR_R_MALLOC_FAILURE);
            goto err;
        }
    }
    if (!sk_CONF_IMODULE_push(initialized_modules, imod)) {
        CONFerr(CONF_F_MODULE_INIT, ERR_R_MALLOC_FAILURE);
        goto err;
    }
    pmod->links++;
    return ret;
 err:
    if (pmod->finish && init_called)
        pmod->finish(imod);
 memerr:
    if (imod) {
        OPENSSL_free(imod->name);
        OPENSSL_free(imod->value);
        OPENSSL_free(imod);
    }
    return -1;
}
['static int module_init(CONF_MODULE *pmod, char *name, char *value,\n                       const CONF *cnf)\n{\n    int ret = 1;\n    int init_called = 0;\n    CONF_IMODULE *imod = NULL;\n    imod = OPENSSL_malloc(sizeof(*imod));\n    if (imod == NULL)\n        goto err;\n    imod->pmod = pmod;\n    imod->name = OPENSSL_strdup(name);\n    imod->value = OPENSSL_strdup(value);\n    imod->usr_data = NULL;\n    if (!imod->name || !imod->value)\n        goto memerr;\n    if (pmod->init) {\n        ret = pmod->init(imod, cnf);\n        init_called = 1;\n        if (ret <= 0)\n            goto err;\n    }\n    if (initialized_modules == NULL) {\n        initialized_modules = sk_CONF_IMODULE_new_null();\n        if (!initialized_modules) {\n            CONFerr(CONF_F_MODULE_INIT, ERR_R_MALLOC_FAILURE);\n            goto err;\n        }\n    }\n    if (!sk_CONF_IMODULE_push(initialized_modules, imod)) {\n        CONFerr(CONF_F_MODULE_INIT, ERR_R_MALLOC_FAILURE);\n        goto err;\n    }\n    pmod->links++;\n    return ret;\n err:\n    if (pmod->finish && init_called)\n        pmod->finish(imod);\n memerr:\n    if (imod) {\n        OPENSSL_free(imod->name);\n        OPENSSL_free(imod->value);\n        OPENSSL_free(imod);\n    }\n    return -1;\n}', 'void *CRYPTO_malloc(size_t num, const char *file, int line)\n{\n    void *ret = NULL;\n    if (num <= 0)\n        return NULL;\n    allow_customize = 0;\n#ifndef OPENSSL_NO_CRYPTO_MDEBUG\n    if (call_malloc_debug) {\n        CRYPTO_mem_debug_malloc(NULL, num, 0, file, line);\n        ret = malloc(num);\n        CRYPTO_mem_debug_malloc(ret, num, 1, file, line);\n    } else {\n        ret = malloc(num);\n    }\n#else\n    (void)file;\n    (void)line;\n    ret = malloc(num);\n#endif\n#ifndef OPENSSL_CPUID_OBJ\n    if (ret && (num > 2048)) {\n        extern unsigned char cleanse_ctr;\n        ((unsigned char *)ret)[0] = cleanse_ctr;\n    }\n#endif\n    return ret;\n}', 'char *CRYPTO_strdup(const char *str, const char* file, int line)\n{\n    char *ret;\n    if (str == NULL)\n        return NULL;\n    ret = CRYPTO_malloc(strlen(str) + 1, file, line);\n    if (ret != NULL)\n        strcpy(ret, str);\n    return ret;\n}']