ssl/ssl_lib.c:321: error: MEMORY_LEAK
  memory dynamically allocated by call to `CRYPTO_zalloc()` at line 311, column 14 is not reachable after line 321, column 9.
Showing all 53 steps of the trace


ssl/ssl_lib.c:260:1: start of procedure dane_tlsa_add()
258.   }
259.   
260. > static int dane_tlsa_add(
261.       SSL_DANE *dane,
262.       uint8_t usage,

ssl/ssl_lib.c:269:5: 
267.   {
268.       danetls_record *t;
269. >     const EVP_MD *md = NULL;
270.       int ilen = (int)dlen;
271.       int i;

ssl/ssl_lib.c:270:5: 
268.       danetls_record *t;
269.       const EVP_MD *md = NULL;
270. >     int ilen = (int)dlen;
271.       int i;
272.       int num;

ssl/ssl_lib.c:274:9: Taking false branch
272.       int num;
273.   
274.       if (dane->trecs == NULL) {
               ^
275.           SSLerr(SSL_F_DANE_TLSA_ADD, SSL_R_DANE_NOT_ENABLED);
276.           return -1;

ssl/ssl_lib.c:279:9: Taking false branch
277.       }
278.   
279.       if (ilen < 0 || dlen != (size_t)ilen) {
               ^
280.           SSLerr(SSL_F_DANE_TLSA_ADD, SSL_R_DANE_TLSA_BAD_DATA_LENGTH);
281.           return 0;

ssl/ssl_lib.c:279:21: Taking false branch
277.       }
278.   
279.       if (ilen < 0 || dlen != (size_t)ilen) {
                           ^
280.           SSLerr(SSL_F_DANE_TLSA_ADD, SSL_R_DANE_TLSA_BAD_DATA_LENGTH);
281.           return 0;

ssl/ssl_lib.c:284:9: Taking false branch
282.       }
283.   
284.       if (usage > DANETLS_USAGE_LAST) {
               ^
285.           SSLerr(SSL_F_DANE_TLSA_ADD, SSL_R_DANE_TLSA_BAD_CERTIFICATE_USAGE);
286.           return 0;

ssl/ssl_lib.c:289:9: Taking false branch
287.       }
288.   
289.       if (selector > DANETLS_SELECTOR_LAST) {
               ^
290.           SSLerr(SSL_F_DANE_TLSA_ADD, SSL_R_DANE_TLSA_BAD_SELECTOR);
291.           return 0;

ssl/ssl_lib.c:294:9: Taking true branch
292.       }
293.   
294.       if (mtype != DANETLS_MATCHING_FULL) {
               ^
295.           md = tlsa_md_get(dane, mtype);
296.           if (md == NULL) {

ssl/ssl_lib.c:295:9: 
293.   
294.       if (mtype != DANETLS_MATCHING_FULL) {
295. >         md = tlsa_md_get(dane, mtype);
296.           if (md == NULL) {
297.               SSLerr(SSL_F_DANE_TLSA_ADD, SSL_R_DANE_TLSA_BAD_MATCHING_TYPE);

ssl/ssl_lib.c:253:1: start of procedure tlsa_md_get()
  251.   }
  252.   
  253. > static const EVP_MD *tlsa_md_get(SSL_DANE *dane, uint8_t mtype)
  254.   {
  255.       if (mtype > dane->dctx->mdmax)

ssl/ssl_lib.c:255:9: Taking false branch
  253.   static const EVP_MD *tlsa_md_get(SSL_DANE *dane, uint8_t mtype)
  254.   {
  255.       if (mtype > dane->dctx->mdmax)
                 ^
  256.           return NULL;
  257.       return dane->dctx->mdevp[mtype];

ssl/ssl_lib.c:257:5: 
  255.       if (mtype > dane->dctx->mdmax)
  256.           return NULL;
  257. >     return dane->dctx->mdevp[mtype];
  258.   }
  259.   

ssl/ssl_lib.c:258:1: return from a call to tlsa_md_get
  256.           return NULL;
  257.       return dane->dctx->mdevp[mtype];
  258. > }
  259.   
  260.   static int dane_tlsa_add(

ssl/ssl_lib.c:296:13: Taking false branch
294.       if (mtype != DANETLS_MATCHING_FULL) {
295.           md = tlsa_md_get(dane, mtype);
296.           if (md == NULL) {
                   ^
297.               SSLerr(SSL_F_DANE_TLSA_ADD, SSL_R_DANE_TLSA_BAD_MATCHING_TYPE);
298.               return 0;

ssl/ssl_lib.c:302:9: Taking true branch
300.       }
301.   
302.       if (md != NULL && dlen != (size_t)EVP_MD_size(md)) {
               ^
303.           SSLerr(SSL_F_DANE_TLSA_ADD, SSL_R_DANE_TLSA_BAD_DIGEST_LENGTH);
304.           return 0;

ssl/ssl_lib.c:302:23: 
300.       }
301.   
302. >     if (md != NULL && dlen != (size_t)EVP_MD_size(md)) {
303.           SSLerr(SSL_F_DANE_TLSA_ADD, SSL_R_DANE_TLSA_BAD_DIGEST_LENGTH);
304.           return 0;

crypto/evp/evp_lib.c:301:1: start of procedure EVP_MD_size()
  299.   }
  300.   
  301. > int EVP_MD_size(const EVP_MD *md)
  302.   {
  303.       if (!md) {

crypto/evp/evp_lib.c:303:10: Taking false branch
  301.   int EVP_MD_size(const EVP_MD *md)
  302.   {
  303.       if (!md) {
                  ^
  304.           EVPerr(EVP_F_EVP_MD_SIZE, EVP_R_MESSAGE_DIGEST_IS_NULL);
  305.           return -1;

crypto/evp/evp_lib.c:307:5: 
  305.           return -1;
  306.       }
  307. >     return md->md_size;
  308.   }
  309.   

crypto/evp/evp_lib.c:308:1: return from a call to EVP_MD_size
  306.       }
  307.       return md->md_size;
  308. > }
  309.   
  310.   unsigned long EVP_MD_flags(const EVP_MD *md)

ssl/ssl_lib.c:302:23: Taking false branch
300.       }
301.   
302.       if (md != NULL && dlen != (size_t)EVP_MD_size(md)) {
                             ^
303.           SSLerr(SSL_F_DANE_TLSA_ADD, SSL_R_DANE_TLSA_BAD_DIGEST_LENGTH);
304.           return 0;

ssl/ssl_lib.c:306:10: Taking false branch
304.           return 0;
305.       }
306.       if (!data) {
                ^
307.           SSLerr(SSL_F_DANE_TLSA_ADD, SSL_R_DANE_TLSA_NULL_DATA);
308.           return 0;

ssl/ssl_lib.c:311:9: 
309.       }
310.   
311. >     if ((t = OPENSSL_zalloc(sizeof(*t))) == NULL) {
312.           SSLerr(SSL_F_DANE_TLSA_ADD, ERR_R_MALLOC_FAILURE);
313.           return -1;

crypto/mem.c:98:1: start of procedure CRYPTO_zalloc()
  96.   }
  97.   
  98. > void *CRYPTO_zalloc(size_t num, const char *file, int line)
  99.   {
  100.       void *ret = CRYPTO_malloc(num, file, line);

crypto/mem.c:100:5: 
  98.   void *CRYPTO_zalloc(size_t num, const char *file, int line)
  99.   {
  100. >     void *ret = CRYPTO_malloc(num, file, line);
  101.   
  102.       if (ret != NULL)

crypto/mem.c:71:1: start of procedure CRYPTO_malloc()
    69.   }
    70.   
    71. > void *CRYPTO_malloc(size_t num, const char *file, int line)
    72.   {
    73.       void *ret = NULL;

crypto/mem.c:73:5: 
    71.   void *CRYPTO_malloc(size_t num, const char *file, int line)
    72.   {
    73. >     void *ret = NULL;
    74.   
    75.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)

crypto/mem.c:75:9: Taking false branch
    73.       void *ret = NULL;
    74.   
    75.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)
                  ^
    76.           return malloc_impl(num, file, line);
    77.   

crypto/mem.c:78:9: Taking false branch
    76.           return malloc_impl(num, file, line);
    77.   
    78.       if (num <= 0)
                  ^
    79.           return NULL;
    80.   

crypto/mem.c:81:5: 
    79.           return NULL;
    80.   
    81. >     allow_customize = 0;
    82.   #ifndef OPENSSL_NO_CRYPTO_MDEBUG
    83.       if (call_malloc_debug) {

crypto/mem.c:91:5: 
    89.       }
    90.   #else
    91. >     osslargused(file); osslargused(line);
    92.       ret = malloc(num);
    93.   #endif

crypto/mem.c:91:24: 
    89.       }
    90.   #else
    91. >     osslargused(file); osslargused(line);
    92.       ret = malloc(num);
    93.   #endif

crypto/mem.c:92:5: 
    90.   #else
    91.       osslargused(file); osslargused(line);
    92. >     ret = malloc(num);
    93.   #endif
    94.   

crypto/mem.c:95:5: 
    93.   #endif
    94.   
    95. >     return ret;
    96.   }
    97.   

crypto/mem.c:96:1: return from a call to CRYPTO_malloc
    94.   
    95.       return ret;
    96. > }
    97.   
    98.   void *CRYPTO_zalloc(size_t num, const char *file, int line)

crypto/mem.c:102:9: Taking true branch
  100.       void *ret = CRYPTO_malloc(num, file, line);
  101.   
  102.       if (ret != NULL)
                 ^
  103.           memset(ret, 0, num);
  104.       return ret;

crypto/mem.c:103:9: 
  101.   
  102.       if (ret != NULL)
  103. >         memset(ret, 0, num);
  104.       return ret;
  105.   }

crypto/mem.c:104:5: 
  102.       if (ret != NULL)
  103.           memset(ret, 0, num);
  104. >     return ret;
  105.   }
  106.   

crypto/mem.c:105:1: return from a call to CRYPTO_zalloc
  103.           memset(ret, 0, num);
  104.       return ret;
  105. > }
  106.   
  107.   void *CRYPTO_realloc(void *str, size_t num, const char *file, int line)

ssl/ssl_lib.c:311:9: Taking false branch
309.       }
310.   
311.       if ((t = OPENSSL_zalloc(sizeof(*t))) == NULL) {
               ^
312.           SSLerr(SSL_F_DANE_TLSA_ADD, ERR_R_MALLOC_FAILURE);
313.           return -1;

ssl/ssl_lib.c:316:5: 
314.       }
315.   
316. >     t->usage = usage;
317.       t->selector = selector;
318.       t->mtype = mtype;

ssl/ssl_lib.c:317:5: 
315.   
316.       t->usage = usage;
317. >     t->selector = selector;
318.       t->mtype = mtype;
319.       t->data = OPENSSL_malloc(ilen);

ssl/ssl_lib.c:318:5: 
316.       t->usage = usage;
317.       t->selector = selector;
318. >     t->mtype = mtype;
319.       t->data = OPENSSL_malloc(ilen);
320.       if (t->data == NULL) {

ssl/ssl_lib.c:319:5: 
317.       t->selector = selector;
318.       t->mtype = mtype;
319. >     t->data = OPENSSL_malloc(ilen);
320.       if (t->data == NULL) {
321.           tlsa_free(t);

crypto/mem.c:71:1: start of procedure CRYPTO_malloc()
  69.   }
  70.   
  71. > void *CRYPTO_malloc(size_t num, const char *file, int line)
  72.   {
  73.       void *ret = NULL;

crypto/mem.c:73:5: 
  71.   void *CRYPTO_malloc(size_t num, const char *file, int line)
  72.   {
  73. >     void *ret = NULL;
  74.   
  75.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)

crypto/mem.c:75:9: Taking true branch
  73.       void *ret = NULL;
  74.   
  75.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)
                ^
  76.           return malloc_impl(num, file, line);
  77.   

crypto/mem.c:75:32: Taking true branch
  73.       void *ret = NULL;
  74.   
  75.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)
                                       ^
  76.           return malloc_impl(num, file, line);
  77.   

crypto/mem.c:76:9: Skipping __function_pointer__(): unresolved function pointer
  74.   
  75.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)
  76.           return malloc_impl(num, file, line);
                ^
  77.   
  78.       if (num <= 0)

crypto/mem.c:96:1: return from a call to CRYPTO_malloc
  94.   
  95.       return ret;
  96. > }
  97.   
  98.   void *CRYPTO_zalloc(size_t num, const char *file, int line)

ssl/ssl_lib.c:320:9: Taking true branch
318.       t->mtype = mtype;
319.       t->data = OPENSSL_malloc(ilen);
320.       if (t->data == NULL) {
               ^
321.           tlsa_free(t);
322.           SSLerr(SSL_F_DANE_TLSA_ADD, ERR_R_MALLOC_FAILURE);

ssl/ssl_lib.c:321:9: Skipping tlsa_free(): empty list of specs
319.       t->data = OPENSSL_malloc(ilen);
320.       if (t->data == NULL) {
321.           tlsa_free(t);
               ^
322.           SSLerr(SSL_F_DANE_TLSA_ADD, ERR_R_MALLOC_FAILURE);
323.           return -1;

static int dane_tlsa_add(
    SSL_DANE *dane,
    uint8_t usage,
    uint8_t selector,
    uint8_t mtype,
    unsigned char *data,
    size_t dlen)
{
    danetls_record *t;
    const EVP_MD *md = NULL;
    int ilen = (int)dlen;
    int i;
    int num;
    if (dane->trecs == NULL) {
        SSLerr(SSL_F_DANE_TLSA_ADD, SSL_R_DANE_NOT_ENABLED);
        return -1;
    }
    if (ilen < 0 || dlen != (size_t)ilen) {
        SSLerr(SSL_F_DANE_TLSA_ADD, SSL_R_DANE_TLSA_BAD_DATA_LENGTH);
        return 0;
    }
    if (usage > DANETLS_USAGE_LAST) {
        SSLerr(SSL_F_DANE_TLSA_ADD, SSL_R_DANE_TLSA_BAD_CERTIFICATE_USAGE);
        return 0;
    }
    if (selector > DANETLS_SELECTOR_LAST) {
        SSLerr(SSL_F_DANE_TLSA_ADD, SSL_R_DANE_TLSA_BAD_SELECTOR);
        return 0;
    }
    if (mtype != DANETLS_MATCHING_FULL) {
        md = tlsa_md_get(dane, mtype);
        if (md == NULL) {
            SSLerr(SSL_F_DANE_TLSA_ADD, SSL_R_DANE_TLSA_BAD_MATCHING_TYPE);
            return 0;
        }
    }
    if (md != NULL && dlen != (size_t)EVP_MD_size(md)) {
        SSLerr(SSL_F_DANE_TLSA_ADD, SSL_R_DANE_TLSA_BAD_DIGEST_LENGTH);
        return 0;
    }
    if (!data) {
        SSLerr(SSL_F_DANE_TLSA_ADD, SSL_R_DANE_TLSA_NULL_DATA);
        return 0;
    }
    if ((t = OPENSSL_zalloc(sizeof(*t))) == NULL) {
        SSLerr(SSL_F_DANE_TLSA_ADD, ERR_R_MALLOC_FAILURE);
        return -1;
    }
    t->usage = usage;
    t->selector = selector;
    t->mtype = mtype;
    t->data = OPENSSL_malloc(ilen);
    if (t->data == NULL) {
        tlsa_free(t);
        SSLerr(SSL_F_DANE_TLSA_ADD, ERR_R_MALLOC_FAILURE);
        return -1;
    }
    memcpy(t->data, data, ilen);
    t->dlen = ilen;
    if (mtype == DANETLS_MATCHING_FULL) {
        const unsigned char *p = data;
        X509 *cert = NULL;
        EVP_PKEY *pkey = NULL;
        switch (selector) {
        case DANETLS_SELECTOR_CERT:
            if (!d2i_X509(&cert, &p, dlen) || p < data ||
                dlen != (size_t)(p - data)) {
                tlsa_free(t);
                SSLerr(SSL_F_DANE_TLSA_ADD, SSL_R_DANE_TLSA_BAD_CERTIFICATE);
                return 0;
            }
            if (X509_get0_pubkey(cert) == NULL) {
                tlsa_free(t);
                SSLerr(SSL_F_DANE_TLSA_ADD, SSL_R_DANE_TLSA_BAD_CERTIFICATE);
                return 0;
            }
            if ((DANETLS_USAGE_BIT(usage) & DANETLS_TA_MASK) == 0) {
                X509_free(cert);
                break;
            }
            if ((dane->certs == NULL &&
                 (dane->certs = sk_X509_new_null()) == NULL) ||
                !sk_X509_push(dane->certs, cert)) {
                SSLerr(SSL_F_DANE_TLSA_ADD, ERR_R_MALLOC_FAILURE);
                X509_free(cert);
                tlsa_free(t);
                return -1;
            }
            break;
        case DANETLS_SELECTOR_SPKI:
            if (!d2i_PUBKEY(&pkey, &p, dlen) || p < data ||
                dlen != (size_t)(p - data)) {
                tlsa_free(t);
                SSLerr(SSL_F_DANE_TLSA_ADD, SSL_R_DANE_TLSA_BAD_PUBLIC_KEY);
                return 0;
            }
            if (usage == DANETLS_USAGE_DANE_TA)
                t->spki = pkey;
            else
                EVP_PKEY_free(pkey);
            break;
        }
    }
    num = sk_danetls_record_num(dane->trecs);
    for (i = 0; i < num; ++i) {
        danetls_record *rec = sk_danetls_record_value(dane->trecs, i);
        if (rec->usage > usage)
            continue;
        if (rec->usage < usage)
            break;
        if (rec->selector > selector)
            continue;
        if (rec->selector < selector)
            break;
        if (dane->dctx->mdord[rec->mtype] > dane->dctx->mdord[mtype])
            continue;
        break;
    }
    if (!sk_danetls_record_insert(dane->trecs, t, i)) {
        tlsa_free(t);
        SSLerr(SSL_F_DANE_TLSA_ADD, ERR_R_MALLOC_FAILURE);
        return -1;
    }
    dane->umask |= DANETLS_USAGE_BIT(usage);
    return 1;
}
['static int dane_tlsa_add(\n    SSL_DANE *dane,\n    uint8_t usage,\n    uint8_t selector,\n    uint8_t mtype,\n    unsigned char *data,\n    size_t dlen)\n{\n    danetls_record *t;\n    const EVP_MD *md = NULL;\n    int ilen = (int)dlen;\n    int i;\n    int num;\n    if (dane->trecs == NULL) {\n        SSLerr(SSL_F_DANE_TLSA_ADD, SSL_R_DANE_NOT_ENABLED);\n        return -1;\n    }\n    if (ilen < 0 || dlen != (size_t)ilen) {\n        SSLerr(SSL_F_DANE_TLSA_ADD, SSL_R_DANE_TLSA_BAD_DATA_LENGTH);\n        return 0;\n    }\n    if (usage > DANETLS_USAGE_LAST) {\n        SSLerr(SSL_F_DANE_TLSA_ADD, SSL_R_DANE_TLSA_BAD_CERTIFICATE_USAGE);\n        return 0;\n    }\n    if (selector > DANETLS_SELECTOR_LAST) {\n        SSLerr(SSL_F_DANE_TLSA_ADD, SSL_R_DANE_TLSA_BAD_SELECTOR);\n        return 0;\n    }\n    if (mtype != DANETLS_MATCHING_FULL) {\n        md = tlsa_md_get(dane, mtype);\n        if (md == NULL) {\n            SSLerr(SSL_F_DANE_TLSA_ADD, SSL_R_DANE_TLSA_BAD_MATCHING_TYPE);\n            return 0;\n        }\n    }\n    if (md != NULL && dlen != (size_t)EVP_MD_size(md)) {\n        SSLerr(SSL_F_DANE_TLSA_ADD, SSL_R_DANE_TLSA_BAD_DIGEST_LENGTH);\n        return 0;\n    }\n    if (!data) {\n        SSLerr(SSL_F_DANE_TLSA_ADD, SSL_R_DANE_TLSA_NULL_DATA);\n        return 0;\n    }\n    if ((t = OPENSSL_zalloc(sizeof(*t))) == NULL) {\n        SSLerr(SSL_F_DANE_TLSA_ADD, ERR_R_MALLOC_FAILURE);\n        return -1;\n    }\n    t->usage = usage;\n    t->selector = selector;\n    t->mtype = mtype;\n    t->data = OPENSSL_malloc(ilen);\n    if (t->data == NULL) {\n        tlsa_free(t);\n        SSLerr(SSL_F_DANE_TLSA_ADD, ERR_R_MALLOC_FAILURE);\n        return -1;\n    }\n    memcpy(t->data, data, ilen);\n    t->dlen = ilen;\n    if (mtype == DANETLS_MATCHING_FULL) {\n        const unsigned char *p = data;\n        X509 *cert = NULL;\n        EVP_PKEY *pkey = NULL;\n        switch (selector) {\n        case DANETLS_SELECTOR_CERT:\n            if (!d2i_X509(&cert, &p, dlen) || p < data ||\n                dlen != (size_t)(p - data)) {\n                tlsa_free(t);\n                SSLerr(SSL_F_DANE_TLSA_ADD, SSL_R_DANE_TLSA_BAD_CERTIFICATE);\n                return 0;\n            }\n            if (X509_get0_pubkey(cert) == NULL) {\n                tlsa_free(t);\n                SSLerr(SSL_F_DANE_TLSA_ADD, SSL_R_DANE_TLSA_BAD_CERTIFICATE);\n                return 0;\n            }\n            if ((DANETLS_USAGE_BIT(usage) & DANETLS_TA_MASK) == 0) {\n                X509_free(cert);\n                break;\n            }\n            if ((dane->certs == NULL &&\n                 (dane->certs = sk_X509_new_null()) == NULL) ||\n                !sk_X509_push(dane->certs, cert)) {\n                SSLerr(SSL_F_DANE_TLSA_ADD, ERR_R_MALLOC_FAILURE);\n                X509_free(cert);\n                tlsa_free(t);\n                return -1;\n            }\n            break;\n        case DANETLS_SELECTOR_SPKI:\n            if (!d2i_PUBKEY(&pkey, &p, dlen) || p < data ||\n                dlen != (size_t)(p - data)) {\n                tlsa_free(t);\n                SSLerr(SSL_F_DANE_TLSA_ADD, SSL_R_DANE_TLSA_BAD_PUBLIC_KEY);\n                return 0;\n            }\n            if (usage == DANETLS_USAGE_DANE_TA)\n                t->spki = pkey;\n            else\n                EVP_PKEY_free(pkey);\n            break;\n        }\n    }\n    num = sk_danetls_record_num(dane->trecs);\n    for (i = 0; i < num; ++i) {\n        danetls_record *rec = sk_danetls_record_value(dane->trecs, i);\n        if (rec->usage > usage)\n            continue;\n        if (rec->usage < usage)\n            break;\n        if (rec->selector > selector)\n            continue;\n        if (rec->selector < selector)\n            break;\n        if (dane->dctx->mdord[rec->mtype] > dane->dctx->mdord[mtype])\n            continue;\n        break;\n    }\n    if (!sk_danetls_record_insert(dane->trecs, t, i)) {\n        tlsa_free(t);\n        SSLerr(SSL_F_DANE_TLSA_ADD, ERR_R_MALLOC_FAILURE);\n        return -1;\n    }\n    dane->umask |= DANETLS_USAGE_BIT(usage);\n    return 1;\n}', 'static const EVP_MD *tlsa_md_get(SSL_DANE *dane, uint8_t mtype)\n{\n    if (mtype > dane->dctx->mdmax)\n        return NULL;\n    return dane->dctx->mdevp[mtype];\n}', 'int EVP_MD_size(const EVP_MD *md)\n{\n    if (!md) {\n        EVPerr(EVP_F_EVP_MD_SIZE, EVP_R_MESSAGE_DIGEST_IS_NULL);\n        return -1;\n    }\n    return md->md_size;\n}', 'void *CRYPTO_zalloc(size_t num, const char *file, int line)\n{\n    void *ret = CRYPTO_malloc(num, file, line);\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    if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)\n        return malloc_impl(num, file, line);\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    osslargused(file); osslargused(line);\n    ret = malloc(num);\n#endif\n    return ret;\n}']