apps/x509.c:1017: error: MEMORY_LEAK
  memory dynamically allocated by call to `X509_STORE_CTX_new()` at line 966, column 11 is not reachable after line 1017, column 5.
Showing all 63 steps of the trace


apps/x509.c:947:1: start of procedure x509_certify()
945.   }
946.   
947. > static int x509_certify(X509_STORE *ctx, const char *CAfile, const EVP_MD *digest,
948.                           X509 *x, X509 *xca, EVP_PKEY *pkey,
949.                           STACK_OF(OPENSSL_STRING) *sigopts,

apps/x509.c:954:5: 
952.                           ASN1_INTEGER *sno, int reqfile, int preserve_dates)
953.   {
954. >     int ret = 0;
955.       ASN1_INTEGER *bs = NULL;
956.       X509_STORE_CTX *xsc = NULL;

apps/x509.c:955:5: 
953.   {
954.       int ret = 0;
955. >     ASN1_INTEGER *bs = NULL;
956.       X509_STORE_CTX *xsc = NULL;
957.       EVP_PKEY *upkey;

apps/x509.c:956:5: 
954.       int ret = 0;
955.       ASN1_INTEGER *bs = NULL;
956. >     X509_STORE_CTX *xsc = NULL;
957.       EVP_PKEY *upkey;
958.   

apps/x509.c:959:5: 
957.       EVP_PKEY *upkey;
958.   
959. >     upkey = X509_get0_pubkey(xca);
960.       if (upkey == NULL) {
961.           BIO_printf(bio_err, "Error obtaining CA X509 public key\n");

crypto/x509/x509_cmp.c:264:1: start of procedure X509_get0_pubkey()
  262.   }
  263.   
  264. > EVP_PKEY *X509_get0_pubkey(const X509 *x)
  265.   {
  266.       if (x == NULL)

crypto/x509/x509_cmp.c:266:9: Taking false branch
  264.   EVP_PKEY *X509_get0_pubkey(const X509 *x)
  265.   {
  266.       if (x == NULL)
                 ^
  267.           return NULL;
  268.       return X509_PUBKEY_get0(x->cert_info.key);

crypto/x509/x509_cmp.c:268:5: 
  266.       if (x == NULL)
  267.           return NULL;
  268. >     return X509_PUBKEY_get0(x->cert_info.key);
  269.   }
  270.   

crypto/x509/x_pubkey.c:140:1: start of procedure X509_PUBKEY_get0()
    138.   }
    139.   
    140. > EVP_PKEY *X509_PUBKEY_get0(X509_PUBKEY *key)
    141.   {
    142.       EVP_PKEY *ret = NULL;

crypto/x509/x_pubkey.c:142:5: 
    140.   EVP_PKEY *X509_PUBKEY_get0(X509_PUBKEY *key)
    141.   {
    142. >     EVP_PKEY *ret = NULL;
    143.   
    144.       if (key == NULL || key->public_key == NULL)

crypto/x509/x_pubkey.c:144:9: Taking false branch
    142.       EVP_PKEY *ret = NULL;
    143.   
    144.       if (key == NULL || key->public_key == NULL)
                   ^
    145.           return NULL;
    146.   

crypto/x509/x_pubkey.c:144:24: Taking false branch
    142.       EVP_PKEY *ret = NULL;
    143.   
    144.       if (key == NULL || key->public_key == NULL)
                                  ^
    145.           return NULL;
    146.   

crypto/x509/x_pubkey.c:147:9: Taking true branch
    145.           return NULL;
    146.   
    147.       if (key->pkey != NULL)
                   ^
    148.           return key->pkey;
    149.   

crypto/x509/x_pubkey.c:148:9: 
    146.   
    147.       if (key->pkey != NULL)
    148. >         return key->pkey;
    149.   
    150.       /*

crypto/x509/x_pubkey.c:166:1: return from a call to X509_PUBKEY_get0
    164.   
    165.       return NULL;
    166. > }
    167.   
    168.   EVP_PKEY *X509_PUBKEY_get(X509_PUBKEY *key)

crypto/x509/x509_cmp.c:269:1: return from a call to X509_get0_pubkey
  267.           return NULL;
  268.       return X509_PUBKEY_get0(x->cert_info.key);
  269. > }
  270.   
  271.   EVP_PKEY *X509_get_pubkey(X509 *x)

apps/x509.c:960:9: Taking false branch
958.   
959.       upkey = X509_get0_pubkey(xca);
960.       if (upkey == NULL) {
               ^
961.           BIO_printf(bio_err, "Error obtaining CA X509 public key\n");
962.           goto end;

apps/x509.c:964:5: 
962.           goto end;
963.       }
964. >     EVP_PKEY_copy_parameters(upkey, pkey);
965.   
966.       xsc = X509_STORE_CTX_new();

crypto/evp/p_lib.c:74:1: start of procedure EVP_PKEY_copy_parameters()
  72.   }
  73.   
  74. > int EVP_PKEY_copy_parameters(EVP_PKEY *to, const EVP_PKEY *from)
  75.   {
  76.       if (to->type == EVP_PKEY_NONE) {

crypto/evp/p_lib.c:76:9: Taking false branch
  74.   int EVP_PKEY_copy_parameters(EVP_PKEY *to, const EVP_PKEY *from)
  75.   {
  76.       if (to->type == EVP_PKEY_NONE) {
                ^
  77.           if (EVP_PKEY_set_type(to, from->type) == 0)
  78.               return 0;

crypto/evp/p_lib.c:79:16: Taking true branch
  77.           if (EVP_PKEY_set_type(to, from->type) == 0)
  78.               return 0;
  79.       } else if (to->type != from->type) {
                       ^
  80.           EVPerr(EVP_F_EVP_PKEY_COPY_PARAMETERS, EVP_R_DIFFERENT_KEY_TYPES);
  81.           goto err;

crypto/evp/p_lib.c:80:9: Skipping ERR_put_error(): empty list of specs
  78.               return 0;
  79.       } else if (to->type != from->type) {
  80.           EVPerr(EVP_F_EVP_PKEY_COPY_PARAMETERS, EVP_R_DIFFERENT_KEY_TYPES);
                ^
  81.           goto err;
  82.       }

crypto/evp/p_lib.c:98:2: 
  96.       if (from->ameth && from->ameth->param_copy)
  97.           return from->ameth->param_copy(to, from);
  98. >  err:
  99.       return 0;
  100.   }

crypto/evp/p_lib.c:99:5: 
  97.           return from->ameth->param_copy(to, from);
  98.    err:
  99. >     return 0;
  100.   }
  101.   

crypto/evp/p_lib.c:100:1: return from a call to EVP_PKEY_copy_parameters
  98.    err:
  99.       return 0;
  100. > }
  101.   
  102.   int EVP_PKEY_missing_parameters(const EVP_PKEY *pkey)

apps/x509.c:966:5: 
964.       EVP_PKEY_copy_parameters(upkey, pkey);
965.   
966. >     xsc = X509_STORE_CTX_new();
967.       if (xsc == NULL || !X509_STORE_CTX_init(xsc, ctx, x, NULL)) {
968.           BIO_printf(bio_err, "Error initialising X509 store\n");

crypto/x509/x509_vfy.c:2151:1: start of procedure X509_STORE_CTX_new()
  2149.   }
  2150.   
  2151. > X509_STORE_CTX *X509_STORE_CTX_new(void)
  2152.   {
  2153.       X509_STORE_CTX *ctx = OPENSSL_zalloc(sizeof(*ctx));

crypto/x509/x509_vfy.c:2153:5: 
  2151.   X509_STORE_CTX *X509_STORE_CTX_new(void)
  2152.   {
  2153. >     X509_STORE_CTX *ctx = OPENSSL_zalloc(sizeof(*ctx));
  2154.   
  2155.       if (ctx == NULL) {

crypto/mem.c:218:1: start of procedure CRYPTO_zalloc()
    216.   }
    217.   
    218. > void *CRYPTO_zalloc(size_t num, const char *file, int line)
    219.   {
    220.       void *ret = CRYPTO_malloc(num, file, line);

crypto/mem.c:220:5: 
    218.   void *CRYPTO_zalloc(size_t num, const char *file, int line)
    219.   {
    220. >     void *ret = CRYPTO_malloc(num, file, line);
    221.   
    222.       FAILTEST();

crypto/mem.c:189:1: start of procedure CRYPTO_malloc()
      187.   #endif
      188.   
      189. > void *CRYPTO_malloc(size_t num, const char *file, int line)
      190.   {
      191.       void *ret = NULL;

crypto/mem.c:191:5: 
      189.   void *CRYPTO_malloc(size_t num, const char *file, int line)
      190.   {
      191. >     void *ret = NULL;
      192.   
      193.       INCREMENT(malloc_count);

crypto/mem.c:194:9: Taking false branch
      192.   
      193.       INCREMENT(malloc_count);
      194.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)
                     ^
      195.           return malloc_impl(num, file, line);
      196.   

crypto/mem.c:197:9: Taking false branch
      195.           return malloc_impl(num, file, line);
      196.   
      197.       if (num == 0)
                     ^
      198.           return NULL;
      199.   

crypto/mem.c:201:5: 
      199.   
      200.       FAILTEST();
      201. >     allow_customize = 0;
      202.   #ifndef OPENSSL_NO_CRYPTO_MDEBUG
      203.       if (call_malloc_debug) {

crypto/mem.c:211:5: 
      209.       }
      210.   #else
      211. >     (void)(file); (void)(line);
      212.       ret = malloc(num);
      213.   #endif

crypto/mem.c:211:19: 
      209.       }
      210.   #else
      211. >     (void)(file); (void)(line);
      212.       ret = malloc(num);
      213.   #endif

crypto/mem.c:212:5: 
      210.   #else
      211.       (void)(file); (void)(line);
      212. >     ret = malloc(num);
      213.   #endif
      214.   

crypto/mem.c:215:5: 
      213.   #endif
      214.   
      215. >     return ret;
      216.   }
      217.   

crypto/mem.c:216:1: return from a call to CRYPTO_malloc
      214.   
      215.       return ret;
      216. > }
      217.   
      218.   void *CRYPTO_zalloc(size_t num, const char *file, int line)

crypto/mem.c:223:9: Taking true branch
    221.   
    222.       FAILTEST();
    223.       if (ret != NULL)
                   ^
    224.           memset(ret, 0, num);
    225.       return ret;

crypto/mem.c:224:9: 
    222.       FAILTEST();
    223.       if (ret != NULL)
    224. >         memset(ret, 0, num);
    225.       return ret;
    226.   }

crypto/mem.c:225:5: 
    223.       if (ret != NULL)
    224.           memset(ret, 0, num);
    225. >     return ret;
    226.   }
    227.   

crypto/mem.c:226:1: return from a call to CRYPTO_zalloc
    224.           memset(ret, 0, num);
    225.       return ret;
    226. > }
    227.   
    228.   void *CRYPTO_realloc(void *str, size_t num, const char *file, int line)

crypto/x509/x509_vfy.c:2155:9: Taking false branch
  2153.       X509_STORE_CTX *ctx = OPENSSL_zalloc(sizeof(*ctx));
  2154.   
  2155.       if (ctx == NULL) {
                  ^
  2156.           X509err(X509_F_X509_STORE_CTX_NEW, ERR_R_MALLOC_FAILURE);
  2157.           return NULL;

crypto/x509/x509_vfy.c:2159:5: 
  2157.           return NULL;
  2158.       }
  2159. >     return ctx;
  2160.   }
  2161.   

crypto/x509/x509_vfy.c:2160:1: return from a call to X509_STORE_CTX_new
  2158.       }
  2159.       return ctx;
  2160. > }
  2161.   
  2162.   void X509_STORE_CTX_free(X509_STORE_CTX *ctx)

apps/x509.c:967:9: Taking false branch
965.   
966.       xsc = X509_STORE_CTX_new();
967.       if (xsc == NULL || !X509_STORE_CTX_init(xsc, ctx, x, NULL)) {
               ^
968.           BIO_printf(bio_err, "Error initialising X509 store\n");
969.           goto end;

apps/x509.c:967:25: Taking true branch
965.   
966.       xsc = X509_STORE_CTX_new();
967.       if (xsc == NULL || !X509_STORE_CTX_init(xsc, ctx, x, NULL)) {
                               ^
968.           BIO_printf(bio_err, "Error initialising X509 store\n");
969.           goto end;

apps/x509.c:968:9: Skipping BIO_printf(): empty list of specs
966.       xsc = X509_STORE_CTX_new();
967.       if (xsc == NULL || !X509_STORE_CTX_init(xsc, ctx, x, NULL)) {
968.           BIO_printf(bio_err, "Error initialising X509 store\n");
               ^
969.           goto end;
970.       }

apps/x509.c:1016:2: 
1014.           goto end;
1015.       ret = 1;
1016. >  end:
1017.       X509_STORE_CTX_free(xsc);
1018.       if (!ret)

apps/x509.c:1017:5: 
1015.       ret = 1;
1016.    end:
1017. >     X509_STORE_CTX_free(xsc);
1018.       if (!ret)
1019.           ERR_print_errors(bio_err);

crypto/x509/x509_vfy.c:2162:1: start of procedure X509_STORE_CTX_free()
  2160.   }
  2161.   
  2162. > void X509_STORE_CTX_free(X509_STORE_CTX *ctx)
  2163.   {
  2164.       if (ctx == NULL)

crypto/x509/x509_vfy.c:2164:9: Taking false branch
  2162.   void X509_STORE_CTX_free(X509_STORE_CTX *ctx)
  2163.   {
  2164.       if (ctx == NULL)
                  ^
  2165.           return;
  2166.   

crypto/x509/x509_vfy.c:2167:5: Skipping X509_STORE_CTX_cleanup(): empty list of specs
  2165.           return;
  2166.   
  2167.       X509_STORE_CTX_cleanup(ctx);
              ^
  2168.       OPENSSL_free(ctx);
  2169.   }

crypto/x509/x509_vfy.c:2168:5: 
  2166.   
  2167.       X509_STORE_CTX_cleanup(ctx);
  2168. >     OPENSSL_free(ctx);
  2169.   }
  2170.   

crypto/mem.c:286:1: start of procedure CRYPTO_free()
    284.   }
    285.   
    286. > void CRYPTO_free(void *str, const char *file, int line)
    287.   {
    288.       INCREMENT(free_count);

crypto/mem.c:289:9: Taking true branch
    287.   {
    288.       INCREMENT(free_count);
    289.       if (free_impl != NULL && free_impl != &CRYPTO_free) {
                   ^
    290.           free_impl(str, file, line);
    291.           return;

crypto/mem.c:289:30: Taking true branch
    287.   {
    288.       INCREMENT(free_count);
    289.       if (free_impl != NULL && free_impl != &CRYPTO_free) {
                                        ^
    290.           free_impl(str, file, line);
    291.           return;

crypto/mem.c:290:9: Skipping __function_pointer__(): unresolved function pointer
    288.       INCREMENT(free_count);
    289.       if (free_impl != NULL && free_impl != &CRYPTO_free) {
    290.           free_impl(str, file, line);
                   ^
    291.           return;
    292.       }

crypto/mem.c:291:9: 
    289.       if (free_impl != NULL && free_impl != &CRYPTO_free) {
    290.           free_impl(str, file, line);
    291. >         return;
    292.       }
    293.   

crypto/mem.c:305:1: return from a call to CRYPTO_free
    303.       free(str);
    304.   #endif
    305. > }
    306.   
    307.   void CRYPTO_clear_free(void *str, size_t num, const char *file, int line)

crypto/x509/x509_vfy.c:2169:1: return from a call to X509_STORE_CTX_free
  2167.       X509_STORE_CTX_cleanup(ctx);
  2168.       OPENSSL_free(ctx);
  2169. > }
  2170.   
  2171.   int X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store, X509 *x509,

static int x509_certify(X509_STORE *ctx, const char *CAfile, const EVP_MD *digest,
                        X509 *x, X509 *xca, EVP_PKEY *pkey,
                        STACK_OF(OPENSSL_STRING) *sigopts,
                        const char *serialfile, int create,
                        int days, int clrext, CONF *conf, const char *section,
                        ASN1_INTEGER *sno, int reqfile, int preserve_dates)
{
    int ret = 0;
    ASN1_INTEGER *bs = NULL;
    X509_STORE_CTX *xsc = NULL;
    EVP_PKEY *upkey;
    upkey = X509_get0_pubkey(xca);
    if (upkey == NULL) {
        BIO_printf(bio_err, "Error obtaining CA X509 public key\n");
        goto end;
    }
    EVP_PKEY_copy_parameters(upkey, pkey);
    xsc = X509_STORE_CTX_new();
    if (xsc == NULL || !X509_STORE_CTX_init(xsc, ctx, x, NULL)) {
        BIO_printf(bio_err, "Error initialising X509 store\n");
        goto end;
    }
    if (sno)
        bs = sno;
    else if ((bs = x509_load_serial(CAfile, serialfile, create)) == NULL)
        goto end;
    X509_STORE_CTX_set_cert(xsc, x);
    X509_STORE_CTX_set_flags(xsc, X509_V_FLAG_CHECK_SS_SIGNATURE);
    if (!reqfile && X509_verify_cert(xsc) <= 0)
        goto end;
    if (!X509_check_private_key(xca, pkey)) {
        BIO_printf(bio_err,
                   "CA certificate and CA private key do not match\n");
        goto end;
    }
    if (!X509_set_issuer_name(x, X509_get_subject_name(xca)))
        goto end;
    if (!X509_set_serialNumber(x, bs))
        goto end;
    if (!preserve_dates && !set_cert_times(x, NULL, NULL, days))
        goto end;
    if (clrext) {
        while (X509_get_ext_count(x) > 0)
            X509_delete_ext(x, 0);
    }
    if (conf != NULL) {
        X509V3_CTX ctx2;
        X509_set_version(x, 2);
        X509V3_set_ctx(&ctx2, xca, x, NULL, NULL, 0);
        X509V3_set_nconf(&ctx2, conf);
        if (!X509V3_EXT_add_nconf(conf, &ctx2, section, x))
            goto end;
    }
    if (!do_X509_sign(x, pkey, digest, sigopts))
        goto end;
    ret = 1;
 end:
    X509_STORE_CTX_free(xsc);
    if (!ret)
        ERR_print_errors(bio_err);
    if (!sno)
        ASN1_INTEGER_free(bs);
    return ret;
}
['static int x509_certify(X509_STORE *ctx, const char *CAfile, const EVP_MD *digest,\n                        X509 *x, X509 *xca, EVP_PKEY *pkey,\n                        STACK_OF(OPENSSL_STRING) *sigopts,\n                        const char *serialfile, int create,\n                        int days, int clrext, CONF *conf, const char *section,\n                        ASN1_INTEGER *sno, int reqfile, int preserve_dates)\n{\n    int ret = 0;\n    ASN1_INTEGER *bs = NULL;\n    X509_STORE_CTX *xsc = NULL;\n    EVP_PKEY *upkey;\n    upkey = X509_get0_pubkey(xca);\n    if (upkey == NULL) {\n        BIO_printf(bio_err, "Error obtaining CA X509 public key\\n");\n        goto end;\n    }\n    EVP_PKEY_copy_parameters(upkey, pkey);\n    xsc = X509_STORE_CTX_new();\n    if (xsc == NULL || !X509_STORE_CTX_init(xsc, ctx, x, NULL)) {\n        BIO_printf(bio_err, "Error initialising X509 store\\n");\n        goto end;\n    }\n    if (sno)\n        bs = sno;\n    else if ((bs = x509_load_serial(CAfile, serialfile, create)) == NULL)\n        goto end;\n    X509_STORE_CTX_set_cert(xsc, x);\n    X509_STORE_CTX_set_flags(xsc, X509_V_FLAG_CHECK_SS_SIGNATURE);\n    if (!reqfile && X509_verify_cert(xsc) <= 0)\n        goto end;\n    if (!X509_check_private_key(xca, pkey)) {\n        BIO_printf(bio_err,\n                   "CA certificate and CA private key do not match\\n");\n        goto end;\n    }\n    if (!X509_set_issuer_name(x, X509_get_subject_name(xca)))\n        goto end;\n    if (!X509_set_serialNumber(x, bs))\n        goto end;\n    if (!preserve_dates && !set_cert_times(x, NULL, NULL, days))\n        goto end;\n    if (clrext) {\n        while (X509_get_ext_count(x) > 0)\n            X509_delete_ext(x, 0);\n    }\n    if (conf != NULL) {\n        X509V3_CTX ctx2;\n        X509_set_version(x, 2);\n        X509V3_set_ctx(&ctx2, xca, x, NULL, NULL, 0);\n        X509V3_set_nconf(&ctx2, conf);\n        if (!X509V3_EXT_add_nconf(conf, &ctx2, section, x))\n            goto end;\n    }\n    if (!do_X509_sign(x, pkey, digest, sigopts))\n        goto end;\n    ret = 1;\n end:\n    X509_STORE_CTX_free(xsc);\n    if (!ret)\n        ERR_print_errors(bio_err);\n    if (!sno)\n        ASN1_INTEGER_free(bs);\n    return ret;\n}', 'EVP_PKEY *X509_get0_pubkey(const X509 *x)\n{\n    if (x == NULL)\n        return NULL;\n    return X509_PUBKEY_get0(x->cert_info.key);\n}', 'EVP_PKEY *X509_PUBKEY_get0(X509_PUBKEY *key)\n{\n    EVP_PKEY *ret = NULL;\n    if (key == NULL || key->public_key == NULL)\n        return NULL;\n    if (key->pkey != NULL)\n        return key->pkey;\n    x509_pubkey_decode(&ret, key);\n    if (ret != NULL) {\n        X509err(X509_F_X509_PUBKEY_GET0, ERR_R_INTERNAL_ERROR);\n        EVP_PKEY_free(ret);\n    }\n    return NULL;\n}', 'int EVP_PKEY_copy_parameters(EVP_PKEY *to, const EVP_PKEY *from)\n{\n    if (to->type == EVP_PKEY_NONE) {\n        if (EVP_PKEY_set_type(to, from->type) == 0)\n            return 0;\n    } else if (to->type != from->type) {\n        EVPerr(EVP_F_EVP_PKEY_COPY_PARAMETERS, EVP_R_DIFFERENT_KEY_TYPES);\n        goto err;\n    }\n    if (EVP_PKEY_missing_parameters(from)) {\n        EVPerr(EVP_F_EVP_PKEY_COPY_PARAMETERS, EVP_R_MISSING_PARAMETERS);\n        goto err;\n    }\n    if (!EVP_PKEY_missing_parameters(to)) {\n        if (EVP_PKEY_cmp_parameters(to, from) == 1)\n            return 1;\n        EVPerr(EVP_F_EVP_PKEY_COPY_PARAMETERS, EVP_R_DIFFERENT_PARAMETERS);\n        return 0;\n    }\n    if (from->ameth && from->ameth->param_copy)\n        return from->ameth->param_copy(to, from);\n err:\n    return 0;\n}', 'X509_STORE_CTX *X509_STORE_CTX_new(void)\n{\n    X509_STORE_CTX *ctx = OPENSSL_zalloc(sizeof(*ctx));\n    if (ctx == NULL) {\n        X509err(X509_F_X509_STORE_CTX_NEW, ERR_R_MALLOC_FAILURE);\n        return NULL;\n    }\n    return ctx;\n}', 'void *CRYPTO_zalloc(size_t num, const char *file, int line)\n{\n    void *ret = CRYPTO_malloc(num, file, line);\n    FAILTEST();\n    if (ret != NULL)\n        memset(ret, 0, num);\n    return ret;\n}', 'void *CRYPTO_malloc(size_t num, const char *file, int line)\n{\n    void *ret = NULL;\n    INCREMENT(malloc_count);\n    if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)\n        return malloc_impl(num, file, line);\n    if (num == 0)\n        return NULL;\n    FAILTEST();\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); (void)(line);\n    ret = malloc(num);\n#endif\n    return ret;\n}', 'void X509_STORE_CTX_free(X509_STORE_CTX *ctx)\n{\n    if (ctx == NULL)\n        return;\n    X509_STORE_CTX_cleanup(ctx);\n    OPENSSL_free(ctx);\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}']