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


ssl/ssl_lib.c:362:1: start of procedure dane_tlsa_add()
360.   }
361.   
362. > static int dane_tlsa_add(
363.       struct dane_st *dane,
364.       uint8_t usage,

ssl/ssl_lib.c:371:5: 
369.   {
370.       danetls_record *t;
371. >     const EVP_MD *md = NULL;
372.       int ilen = (int)dlen;
373.       int i;

ssl/ssl_lib.c:372:5: 
370.       danetls_record *t;
371.       const EVP_MD *md = NULL;
372. >     int ilen = (int)dlen;
373.       int i;
374.   

ssl/ssl_lib.c:375:9: Taking false branch
373.       int i;
374.   
375.       if (dane->trecs == NULL) {
               ^
376.           SSLerr(SSL_F_DANE_TLSA_ADD, SSL_R_DANE_NOT_ENABLED);
377.           return -1;

ssl/ssl_lib.c:380:9: Taking false branch
378.       }
379.   
380.       if (ilen < 0 || dlen != (size_t)ilen) {
               ^
381.           SSLerr(SSL_F_DANE_TLSA_ADD, SSL_R_DANE_TLSA_BAD_DATA_LENGTH);
382.           return 0;

ssl/ssl_lib.c:380:21: Taking false branch
378.       }
379.   
380.       if (ilen < 0 || dlen != (size_t)ilen) {
                           ^
381.           SSLerr(SSL_F_DANE_TLSA_ADD, SSL_R_DANE_TLSA_BAD_DATA_LENGTH);
382.           return 0;

ssl/ssl_lib.c:385:9: Taking false branch
383.       }
384.   
385.       if (usage > DANETLS_USAGE_LAST) {
               ^
386.           SSLerr(SSL_F_DANE_TLSA_ADD, SSL_R_DANE_TLSA_BAD_CERTIFICATE_USAGE);
387.           return 0;

ssl/ssl_lib.c:390:9: Taking false branch
388.       }
389.   
390.       if (selector > DANETLS_SELECTOR_LAST) {
               ^
391.           SSLerr(SSL_F_DANE_TLSA_ADD, SSL_R_DANE_TLSA_BAD_SELECTOR);
392.           return 0;

ssl/ssl_lib.c:395:9: Taking true branch
393.       }
394.   
395.       if (mtype != DANETLS_MATCHING_FULL) {
               ^
396.           md = tlsa_md_get(dane, mtype);
397.           if (md == NULL) {

ssl/ssl_lib.c:396:9: 
394.   
395.       if (mtype != DANETLS_MATCHING_FULL) {
396. >         md = tlsa_md_get(dane, mtype);
397.           if (md == NULL) {
398.               SSLerr(SSL_F_DANE_TLSA_ADD, SSL_R_DANE_TLSA_BAD_MATCHING_TYPE);

ssl/ssl_lib.c:355:1: start of procedure tlsa_md_get()
  353.   }
  354.   
  355. > static const EVP_MD *tlsa_md_get(struct dane_st *dane, uint8_t mtype)
  356.   {
  357.       if (mtype > dane->dctx->mdmax)

ssl/ssl_lib.c:357:9: Taking false branch
  355.   static const EVP_MD *tlsa_md_get(struct dane_st *dane, uint8_t mtype)
  356.   {
  357.       if (mtype > dane->dctx->mdmax)
                 ^
  358.           return NULL;
  359.       return dane->dctx->mdevp[mtype];

ssl/ssl_lib.c:359:5: 
  357.       if (mtype > dane->dctx->mdmax)
  358.           return NULL;
  359. >     return dane->dctx->mdevp[mtype];
  360.   }
  361.   

ssl/ssl_lib.c:360:1: return from a call to tlsa_md_get
  358.           return NULL;
  359.       return dane->dctx->mdevp[mtype];
  360. > }
  361.   
  362.   static int dane_tlsa_add(

ssl/ssl_lib.c:397:13: Taking false branch
395.       if (mtype != DANETLS_MATCHING_FULL) {
396.           md = tlsa_md_get(dane, mtype);
397.           if (md == NULL) {
                   ^
398.               SSLerr(SSL_F_DANE_TLSA_ADD, SSL_R_DANE_TLSA_BAD_MATCHING_TYPE);
399.               return 0;

ssl/ssl_lib.c:403:9: Taking true branch
401.       }
402.   
403.       if (md != NULL && dlen != (size_t)EVP_MD_size(md)) {
               ^
404.           SSLerr(SSL_F_DANE_TLSA_ADD, SSL_R_DANE_TLSA_BAD_DIGEST_LENGTH);
405.           return 0;

ssl/ssl_lib.c:403:23: 
401.       }
402.   
403. >     if (md != NULL && dlen != (size_t)EVP_MD_size(md)) {
404.           SSLerr(SSL_F_DANE_TLSA_ADD, SSL_R_DANE_TLSA_BAD_DIGEST_LENGTH);
405.           return 0;

crypto/evp/evp_lib.c:349:1: start of procedure EVP_MD_size()
  347.   }
  348.   
  349. > int EVP_MD_size(const EVP_MD *md)
  350.   {
  351.       if (!md) {

crypto/evp/evp_lib.c:351:10: Taking false branch
  349.   int EVP_MD_size(const EVP_MD *md)
  350.   {
  351.       if (!md) {
                  ^
  352.           EVPerr(EVP_F_EVP_MD_SIZE, EVP_R_MESSAGE_DIGEST_IS_NULL);
  353.           return -1;

crypto/evp/evp_lib.c:355:5: 
  353.           return -1;
  354.       }
  355. >     return md->md_size;
  356.   }
  357.   

crypto/evp/evp_lib.c:356:1: return from a call to EVP_MD_size
  354.       }
  355.       return md->md_size;
  356. > }
  357.   
  358.   unsigned long EVP_MD_flags(const EVP_MD *md)

ssl/ssl_lib.c:403:23: Taking false branch
401.       }
402.   
403.       if (md != NULL && dlen != (size_t)EVP_MD_size(md)) {
                             ^
404.           SSLerr(SSL_F_DANE_TLSA_ADD, SSL_R_DANE_TLSA_BAD_DIGEST_LENGTH);
405.           return 0;

ssl/ssl_lib.c:407:10: Taking false branch
405.           return 0;
406.       }
407.       if (!data) {
                ^
408.           SSLerr(SSL_F_DANE_TLSA_ADD, SSL_R_DANE_TLSA_NULL_DATA);
409.           return 0;

ssl/ssl_lib.c:412:9: 
410.       }
411.   
412. >     if ((t = OPENSSL_zalloc(sizeof(*t))) == NULL) {
413.           SSLerr(SSL_F_DANE_TLSA_ADD, ERR_R_MALLOC_FAILURE);
414.           return -1;

crypto/mem.c:146:1: start of procedure CRYPTO_zalloc()
  144.   }
  145.   
  146. > void *CRYPTO_zalloc(size_t num, const char *file, int line)
  147.   {
  148.       void *ret = CRYPTO_malloc(num, file, line);

crypto/mem.c:148:5: 
  146.   void *CRYPTO_zalloc(size_t num, const char *file, int line)
  147.   {
  148. >     void *ret = CRYPTO_malloc(num, file, line);
  149.   
  150.       if (ret != NULL)

crypto/mem.c:119:1: start of procedure CRYPTO_malloc()
    117.   }
    118.   
    119. > void *CRYPTO_malloc(size_t num, const char *file, int line)
    120.   {
    121.       void *ret = NULL;

crypto/mem.c:121:5: 
    119.   void *CRYPTO_malloc(size_t num, const char *file, int line)
    120.   {
    121. >     void *ret = NULL;
    122.   
    123.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)

crypto/mem.c:123:9: Taking false branch
    121.       void *ret = NULL;
    122.   
    123.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)
                   ^
    124.           return malloc_impl(num, file, line);
    125.   

crypto/mem.c:126:9: Taking false branch
    124.           return malloc_impl(num, file, line);
    125.   
    126.       if (num <= 0)
                   ^
    127.           return NULL;
    128.   

crypto/mem.c:129:5: 
    127.           return NULL;
    128.   
    129. >     allow_customize = 0;
    130.   #ifndef OPENSSL_NO_CRYPTO_MDEBUG
    131.       if (call_malloc_debug) {

crypto/mem.c:139:5: 
    137.       }
    138.   #else
    139. >     osslargused(file); osslargused(line);
    140.       ret = malloc(num);
    141.   #endif

crypto/mem.c:139:24: 
    137.       }
    138.   #else
    139. >     osslargused(file); osslargused(line);
    140.       ret = malloc(num);
    141.   #endif

crypto/mem.c:140:5: 
    138.   #else
    139.       osslargused(file); osslargused(line);
    140. >     ret = malloc(num);
    141.   #endif
    142.   

crypto/mem.c:143:5: 
    141.   #endif
    142.   
    143. >     return ret;
    144.   }
    145.   

crypto/mem.c:144:1: return from a call to CRYPTO_malloc
    142.   
    143.       return ret;
    144. > }
    145.   
    146.   void *CRYPTO_zalloc(size_t num, const char *file, int line)

crypto/mem.c:150:9: Taking true branch
  148.       void *ret = CRYPTO_malloc(num, file, line);
  149.   
  150.       if (ret != NULL)
                 ^
  151.           memset(ret, 0, num);
  152.       return ret;

crypto/mem.c:151:9: 
  149.   
  150.       if (ret != NULL)
  151. >         memset(ret, 0, num);
  152.       return ret;
  153.   }

crypto/mem.c:152:5: 
  150.       if (ret != NULL)
  151.           memset(ret, 0, num);
  152. >     return ret;
  153.   }
  154.   

crypto/mem.c:153:1: return from a call to CRYPTO_zalloc
  151.           memset(ret, 0, num);
  152.       return ret;
  153. > }
  154.   
  155.   void *CRYPTO_realloc(void *str, size_t num, const char *file, int line)

ssl/ssl_lib.c:412:9: Taking false branch
410.       }
411.   
412.       if ((t = OPENSSL_zalloc(sizeof(*t))) == NULL) {
               ^
413.           SSLerr(SSL_F_DANE_TLSA_ADD, ERR_R_MALLOC_FAILURE);
414.           return -1;

ssl/ssl_lib.c:417:5: 
415.       }
416.   
417. >     t->usage = usage;
418.       t->selector = selector;
419.       t->mtype = mtype;

ssl/ssl_lib.c:418:5: 
416.   
417.       t->usage = usage;
418. >     t->selector = selector;
419.       t->mtype = mtype;
420.       t->data = OPENSSL_malloc(ilen);

ssl/ssl_lib.c:419:5: 
417.       t->usage = usage;
418.       t->selector = selector;
419. >     t->mtype = mtype;
420.       t->data = OPENSSL_malloc(ilen);
421.       if (t->data == NULL) {

ssl/ssl_lib.c:420:5: 
418.       t->selector = selector;
419.       t->mtype = mtype;
420. >     t->data = OPENSSL_malloc(ilen);
421.       if (t->data == NULL) {
422.           tlsa_free(t);

crypto/mem.c:119:1: start of procedure CRYPTO_malloc()
  117.   }
  118.   
  119. > void *CRYPTO_malloc(size_t num, const char *file, int line)
  120.   {
  121.       void *ret = NULL;

crypto/mem.c:121:5: 
  119.   void *CRYPTO_malloc(size_t num, const char *file, int line)
  120.   {
  121. >     void *ret = NULL;
  122.   
  123.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)

crypto/mem.c:123:9: Taking true branch
  121.       void *ret = NULL;
  122.   
  123.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)
                 ^
  124.           return malloc_impl(num, file, line);
  125.   

crypto/mem.c:123:32: Taking true branch
  121.       void *ret = NULL;
  122.   
  123.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)
                                        ^
  124.           return malloc_impl(num, file, line);
  125.   

crypto/mem.c:124:9: Skipping __function_pointer__(): unresolved function pointer
  122.   
  123.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)
  124.           return malloc_impl(num, file, line);
                 ^
  125.   
  126.       if (num <= 0)

crypto/mem.c:144:1: return from a call to CRYPTO_malloc
  142.   
  143.       return ret;
  144. > }
  145.   
  146.   void *CRYPTO_zalloc(size_t num, const char *file, int line)

ssl/ssl_lib.c:421:9: Taking true branch
419.       t->mtype = mtype;
420.       t->data = OPENSSL_malloc(ilen);
421.       if (t->data == NULL) {
               ^
422.           tlsa_free(t);
423.           SSLerr(SSL_F_DANE_TLSA_ADD, ERR_R_MALLOC_FAILURE);

ssl/ssl_lib.c:422:9: Skipping tlsa_free(): empty list of specs
420.       t->data = OPENSSL_malloc(ilen);
421.       if (t->data == NULL) {
422.           tlsa_free(t);
               ^
423.           SSLerr(SSL_F_DANE_TLSA_ADD, ERR_R_MALLOC_FAILURE);
424.           return -1;

static int dane_tlsa_add(
    struct dane_st *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;
    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;
        }
    }
    for (i = 0; i < sk_danetls_record_num(dane->trecs); ++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    struct dane_st *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    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    for (i = 0; i < sk_danetls_record_num(dane->trecs); ++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(struct dane_st *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}']