void CRYPTO_free(void *str, const char *file, int line)
{
    INCREMENT(free_count);
    if (free_impl != NULL && free_impl != &CRYPTO_free) {
        free_impl(str, file, line);
        return;
    }
#ifndef OPENSSL_NO_CRYPTO_MDEBUG
    if (call_malloc_debug) {
        CRYPTO_mem_debug_free(str, 0, file, line);
        free(str);
        CRYPTO_mem_debug_free(str, 1, file, line);
    } else {
        free(str);
    }
#else
    free(str);
#endif
}
['static int pkey_mac_copy(EVP_PKEY_CTX *dst, EVP_PKEY_CTX *src)\n{\n    MAC_PKEY_CTX *sctx, *dctx;\n    if (!pkey_mac_init(dst))\n        return 0;\n    sctx = EVP_PKEY_CTX_get_data(src);\n    dctx = EVP_PKEY_CTX_get_data(dst);\n    if (!EVP_MAC_CTX_copy(dctx->ctx, sctx->ctx))\n        goto err;\n    switch (dctx->type) {\n    case MAC_TYPE_RAW:\n        dctx->raw_data.md = sctx->raw_data.md;\n        if (ASN1_STRING_get0_data(&sctx->raw_data.ktmp) != NULL &&\n            !ASN1_STRING_copy(&dctx->raw_data.ktmp, &sctx->raw_data.ktmp))\n            goto err;\n        break;\n    case MAC_TYPE_MAC:\n        break;\n    default:\n        return 0;\n    }\n    return 1;\n err:\n    pkey_mac_cleanup (dst);\n    return 0;\n}', 'int ASN1_STRING_copy(ASN1_STRING *dst, const ASN1_STRING *str)\n{\n    if (str == NULL)\n        return 0;\n    dst->type = str->type;\n    if (!ASN1_STRING_set(dst, str->data, str->length))\n        return 0;\n    dst->flags &= ASN1_STRING_FLAG_EMBED;\n    dst->flags |= str->flags & ~ASN1_STRING_FLAG_EMBED;\n    return 1;\n}', "int ASN1_STRING_set(ASN1_STRING *str, const void *_data, int len)\n{\n    unsigned char *c;\n    const char *data = _data;\n    if (len < 0) {\n        if (data == NULL)\n            return 0;\n        else\n            len = strlen(data);\n    }\n    if ((str->length <= len) || (str->data == NULL)) {\n        c = str->data;\n        str->data = OPENSSL_realloc(c, len + 1);\n        if (str->data == NULL) {\n            ASN1err(ASN1_F_ASN1_STRING_SET, ERR_R_MALLOC_FAILURE);\n            str->data = c;\n            return 0;\n        }\n    }\n    str->length = len;\n    if (data != NULL) {\n        memcpy(str->data, data, len);\n        str->data[len] = '\\0';\n    }\n    return 1;\n}", 'void *CRYPTO_realloc(void *str, size_t num, const char *file, int line)\n{\n    INCREMENT(realloc_count);\n    if (realloc_impl != NULL && realloc_impl != &CRYPTO_realloc)\n        return realloc_impl(str, num, file, line);\n    FAILTEST();\n    if (str == NULL)\n        return CRYPTO_malloc(num, file, line);\n    if (num == 0) {\n        CRYPTO_free(str, file, line);\n        return NULL;\n    }\n#ifndef OPENSSL_NO_CRYPTO_MDEBUG\n    if (call_malloc_debug) {\n        void *ret;\n        CRYPTO_mem_debug_realloc(str, NULL, num, 0, file, line);\n        ret = realloc(str, num);\n        CRYPTO_mem_debug_realloc(str, ret, num, 1, file, line);\n        return ret;\n    }\n#else\n    (void)(file); (void)(line);\n#endif\n    return realloc(str, num);\n}', 'void CRYPTO_free(void *str, const char *file, int line)\n{\n    INCREMENT(free_count);\n    if (free_impl != NULL && free_impl != &CRYPTO_free) {\n        free_impl(str, file, line);\n        return;\n    }\n#ifndef OPENSSL_NO_CRYPTO_MDEBUG\n    if (call_malloc_debug) {\n        CRYPTO_mem_debug_free(str, 0, file, line);\n        free(str);\n        CRYPTO_mem_debug_free(str, 1, file, line);\n    } else {\n        free(str);\n    }\n#else\n    free(str);\n#endif\n}']