crypto/conf/conf_def.c:246: error: MEMORY_LEAK
  memory dynamically allocated by call to `_CONF_new_section()` at line 236, column 10 is not reachable after line 246, column 13.
Showing all 169 steps of the trace


crypto/conf/conf_def.c:204:1: start of procedure def_load_bio()
202.   }
203.   
204. > static int def_load_bio(CONF *conf, BIO *in, long *line)
205.   {
206.   /* The macro BUFSIZE conflicts with a system macro in VxWorks */

crypto/conf/conf_def.c:208:5: 
206.   /* The macro BUFSIZE conflicts with a system macro in VxWorks */
207.   #define CONFBUFSIZE     512
208. >     int bufnum = 0, i, ii;
209.       BUF_MEM *buff = NULL;
210.       char *s, *p, *end;

crypto/conf/conf_def.c:209:5: 
207.   #define CONFBUFSIZE     512
208.       int bufnum = 0, i, ii;
209. >     BUF_MEM *buff = NULL;
210.       char *s, *p, *end;
211.       int again;

crypto/conf/conf_def.c:212:5: 
210.       char *s, *p, *end;
211.       int again;
212. >     long eline = 0;
213.       char btmp[DECIMAL_SIZE(eline) + 1];
214.       CONF_VALUE *v = NULL, *tv;

crypto/conf/conf_def.c:214:5: 
212.       long eline = 0;
213.       char btmp[DECIMAL_SIZE(eline) + 1];
214. >     CONF_VALUE *v = NULL, *tv;
215.       CONF_VALUE *sv = NULL;
216.       char *section = NULL, *buf;

crypto/conf/conf_def.c:215:5: 
213.       char btmp[DECIMAL_SIZE(eline) + 1];
214.       CONF_VALUE *v = NULL, *tv;
215. >     CONF_VALUE *sv = NULL;
216.       char *section = NULL, *buf;
217.       char *start, *psection, *pname;

crypto/conf/conf_def.c:216:5: 
214.       CONF_VALUE *v = NULL, *tv;
215.       CONF_VALUE *sv = NULL;
216. >     char *section = NULL, *buf;
217.       char *start, *psection, *pname;
218.       void *h = (void *)(conf->data);

crypto/conf/conf_def.c:218:5: 
216.       char *section = NULL, *buf;
217.       char *start, *psection, *pname;
218. >     void *h = (void *)(conf->data);
219.   
220.       if ((buff = BUF_MEM_new()) == NULL) {

crypto/conf/conf_def.c:220:9: 
218.       void *h = (void *)(conf->data);
219.   
220. >     if ((buff = BUF_MEM_new()) == NULL) {
221.           CONFerr(CONF_F_DEF_LOAD_BIO, ERR_R_BUF_LIB);
222.           goto err;

crypto/buffer/buffer.c:79:1: start of procedure BUF_MEM_new()
  77.   }
  78.   
  79. > BUF_MEM *BUF_MEM_new(void)
  80.   {
  81.       BUF_MEM *ret;

crypto/buffer/buffer.c:83:5: 
  81.       BUF_MEM *ret;
  82.   
  83. >     ret = OPENSSL_zalloc(sizeof(*ret));
  84.       if (ret == NULL) {
  85.           BUFerr(BUF_F_BUF_MEM_NEW, ERR_R_MALLOC_FAILURE);

crypto/mem.c:156:1: start of procedure CRYPTO_zalloc()
    154.   }
    155.   
    156. > void *CRYPTO_zalloc(size_t num, const char *file, int line)
    157.   {
    158.       void *ret = CRYPTO_malloc(num, file, line);

crypto/mem.c:158:5: 
    156.   void *CRYPTO_zalloc(size_t num, const char *file, int line)
    157.   {
    158. >     void *ret = CRYPTO_malloc(num, file, line);
    159.   
    160.       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 (num <= 0)

crypto/mem.c:123:9: Taking false branch
      121.       void *ret = NULL;
      122.   
      123.       if (num <= 0)
                     ^
      124.           return NULL;
      125.   

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

crypto/mem.c:136:5: 
      134.       }
      135.   #else
      136. >     (void)file;
      137.       (void)line;
      138.       ret = malloc(num);

crypto/mem.c:137:5: 
      135.   #else
      136.       (void)file;
      137. >     (void)line;
      138.       ret = malloc(num);
      139.   #endif

crypto/mem.c:138:5: 
      136.       (void)file;
      137.       (void)line;
      138. >     ret = malloc(num);
      139.   #endif
      140.   

crypto/mem.c:153:5: 
      151.   #endif
      152.   
      153. >     return ret;
      154.   }
      155.   

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

crypto/mem.c:160:9: Taking true branch
    158.       void *ret = CRYPTO_malloc(num, file, line);
    159.   
    160.       if (ret != NULL)
                   ^
    161.           memset(ret, 0, num);
    162.       return ret;

crypto/mem.c:161:9: 
    159.   
    160.       if (ret != NULL)
    161. >         memset(ret, 0, num);
    162.       return ret;
    163.   }

crypto/mem.c:162:5: 
    160.       if (ret != NULL)
    161.           memset(ret, 0, num);
    162. >     return ret;
    163.   }
    164.   

crypto/mem.c:163:1: return from a call to CRYPTO_zalloc
    161.           memset(ret, 0, num);
    162.       return ret;
    163. > }
    164.   
    165.   void *CRYPTO_realloc(void *str, size_t num, const char *file, int line)

crypto/buffer/buffer.c:84:9: Taking false branch
  82.   
  83.       ret = OPENSSL_zalloc(sizeof(*ret));
  84.       if (ret == NULL) {
                ^
  85.           BUFerr(BUF_F_BUF_MEM_NEW, ERR_R_MALLOC_FAILURE);
  86.           return (NULL);

crypto/buffer/buffer.c:88:5: 
  86.           return (NULL);
  87.       }
  88. >     return (ret);
  89.   }
  90.   

crypto/buffer/buffer.c:89:1: return from a call to BUF_MEM_new
  87.       }
  88.       return (ret);
  89. > }
  90.   
  91.   void BUF_MEM_free(BUF_MEM *a)

crypto/conf/conf_def.c:220:9: Taking false branch
218.       void *h = (void *)(conf->data);
219.   
220.       if ((buff = BUF_MEM_new()) == NULL) {
               ^
221.           CONFerr(CONF_F_DEF_LOAD_BIO, ERR_R_BUF_LIB);
222.           goto err;

crypto/conf/conf_def.c:225:5: 
223.       }
224.   
225. >     section = OPENSSL_strdup("default");
226.       if (section == NULL) {
227.           CONFerr(CONF_F_DEF_LOAD_BIO, ERR_R_MALLOC_FAILURE);

crypto/o_str.c:120:1: start of procedure CRYPTO_strdup()
  118.   }
  119.   
  120. > char *CRYPTO_strdup(const char *str, const char* file, int line)
  121.   {
  122.       char *ret;

crypto/o_str.c:125:9: Taking false branch
  123.       size_t size;
  124.   
  125.       if (str == NULL)
                 ^
  126.           return NULL;
  127.       size = strlen(str) + 1;

crypto/o_str.c:127:5: 
  125.       if (str == NULL)
  126.           return NULL;
  127. >     size = strlen(str) + 1;
  128.       ret = CRYPTO_malloc(size, file, line);
  129.       if (ret != NULL)

crypto/o_str.c:128:5: 
  126.           return NULL;
  127.       size = strlen(str) + 1;
  128. >     ret = CRYPTO_malloc(size, file, line);
  129.       if (ret != NULL)
  130.           memcpy(ret, str, size);

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 (num <= 0)

crypto/mem.c:123:9: Taking false branch
    121.       void *ret = NULL;
    122.   
    123.       if (num <= 0)
                   ^
    124.           return NULL;
    125.   

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

crypto/mem.c:136:5: 
    134.       }
    135.   #else
    136. >     (void)file;
    137.       (void)line;
    138.       ret = malloc(num);

crypto/mem.c:137:5: 
    135.   #else
    136.       (void)file;
    137. >     (void)line;
    138.       ret = malloc(num);
    139.   #endif

crypto/mem.c:138:5: 
    136.       (void)file;
    137.       (void)line;
    138. >     ret = malloc(num);
    139.   #endif
    140.   

crypto/mem.c:153:5: 
    151.   #endif
    152.   
    153. >     return ret;
    154.   }
    155.   

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

crypto/o_str.c:129:9: Taking true branch
  127.       size = strlen(str) + 1;
  128.       ret = CRYPTO_malloc(size, file, line);
  129.       if (ret != NULL)
                 ^
  130.           memcpy(ret, str, size);
  131.       return ret;

crypto/o_str.c:130:9: 
  128.       ret = CRYPTO_malloc(size, file, line);
  129.       if (ret != NULL)
  130. >         memcpy(ret, str, size);
  131.       return ret;
  132.   }

crypto/o_str.c:131:5: 
  129.       if (ret != NULL)
  130.           memcpy(ret, str, size);
  131. >     return ret;
  132.   }
  133.   

crypto/o_str.c:132:1: return from a call to CRYPTO_strdup
  130.           memcpy(ret, str, size);
  131.       return ret;
  132. > }
  133.   
  134.   char *CRYPTO_strndup(const char *str, size_t s, const char* file, int line)

crypto/conf/conf_def.c:226:9: Taking false branch
224.   
225.       section = OPENSSL_strdup("default");
226.       if (section == NULL) {
               ^
227.           CONFerr(CONF_F_DEF_LOAD_BIO, ERR_R_MALLOC_FAILURE);
228.           goto err;

crypto/conf/conf_def.c:231:9: 
229.       }
230.   
231. >     if (_CONF_new_data(conf) == 0) {
232.           CONFerr(CONF_F_DEF_LOAD_BIO, ERR_R_MALLOC_FAILURE);
233.           goto err;

crypto/conf/conf_api.c:179:1: start of procedure _CONF_new_data()
  177.   }
  178.   
  179. > int _CONF_new_data(CONF *conf)
  180.   {
  181.       if (conf == NULL) {

crypto/conf/conf_api.c:181:9: Taking false branch
  179.   int _CONF_new_data(CONF *conf)
  180.   {
  181.       if (conf == NULL) {
                 ^
  182.           return 0;
  183.       }

crypto/conf/conf_api.c:184:9: Taking false branch
  182.           return 0;
  183.       }
  184.       if (conf->data == NULL) {
                 ^
  185.           conf->data = lh_CONF_VALUE_new(conf_value_hash, conf_value_cmp);
  186.           if (conf->data == NULL)

crypto/conf/conf_api.c:189:5: 
  187.               return 0;
  188.       }
  189. >     return 1;
  190.   }
  191.   

crypto/conf/conf_api.c:190:1: return from a call to _CONF_new_data
  188.       }
  189.       return 1;
  190. > }
  191.   
  192.   typedef LHASH_OF(CONF_VALUE) LH_CONF_VALUE;

crypto/conf/conf_def.c:231:9: Taking false branch
229.       }
230.   
231.       if (_CONF_new_data(conf) == 0) {
               ^
232.           CONFerr(CONF_F_DEF_LOAD_BIO, ERR_R_MALLOC_FAILURE);
233.           goto err;

crypto/conf/conf_def.c:236:5: 
234.       }
235.   
236. >     sv = _CONF_new_section(conf, section);
237.       if (sv == NULL) {
238.           CONFerr(CONF_F_DEF_LOAD_BIO, CONF_R_UNABLE_TO_CREATE_NEW_SECTION);

crypto/conf/conf_api.c:242:1: start of procedure _CONF_new_section()
  240.   
  241.   /* Up until OpenSSL 0.9.5a, this was new_section */
  242. > CONF_VALUE *_CONF_new_section(CONF *conf, const char *section)
  243.   {
  244.       STACK_OF(CONF_VALUE) *sk = NULL;

crypto/conf/conf_api.c:244:5: 
  242.   CONF_VALUE *_CONF_new_section(CONF *conf, const char *section)
  243.   {
  244. >     STACK_OF(CONF_VALUE) *sk = NULL;
  245.       int i;
  246.       CONF_VALUE *v = NULL, *vv;

crypto/conf/conf_api.c:246:5: 
  244.       STACK_OF(CONF_VALUE) *sk = NULL;
  245.       int i;
  246. >     CONF_VALUE *v = NULL, *vv;
  247.   
  248.       if ((sk = sk_CONF_VALUE_new_null()) == NULL)

crypto/conf/conf_api.c:248:9: 
  246.       CONF_VALUE *v = NULL, *vv;
  247.   
  248. >     if ((sk = sk_CONF_VALUE_new_null()) == NULL)
  249.           goto err;
  250.       if ((v = OPENSSL_malloc(sizeof(*v))) == NULL)

include/openssl/conf.h:79:1: start of procedure sk_CONF_VALUE_new_null()
    77.   } CONF_VALUE;
    78.   
    79. > DEFINE_STACK_OF(CONF_VALUE)
    80.   DEFINE_LHASH_OF(CONF_VALUE);
    81.   

crypto/stack/stack.c:144:1: start of procedure sk_new_null()
      142.   }
      143.   
      144. > _STACK *sk_new_null(void)
      145.   {
      146.       return sk_new((int (*)(const void *, const void *))0);

crypto/stack/stack.c:146:5: 
      144.   _STACK *sk_new_null(void)
      145.   {
      146. >     return sk_new((int (*)(const void *, const void *))0);
      147.   }
      148.   

crypto/stack/stack.c:149:1: start of procedure sk_new()
        147.   }
        148.   
        149. > _STACK *sk_new(int (*c) (const void *, const void *))
        150.   {
        151.       _STACK *ret;

crypto/stack/stack.c:153:9: 
        151.       _STACK *ret;
        152.   
        153. >     if ((ret = OPENSSL_zalloc(sizeof(_STACK))) == NULL)
        154.           goto err;
        155.       if ((ret->data = OPENSSL_zalloc(sizeof(*ret->data) * MIN_NODES)) == NULL)

crypto/mem.c:156:1: start of procedure CRYPTO_zalloc()
          154.   }
          155.   
          156. > void *CRYPTO_zalloc(size_t num, const char *file, int line)
          157.   {
          158.       void *ret = CRYPTO_malloc(num, file, line);

crypto/mem.c:158:5: 
          156.   void *CRYPTO_zalloc(size_t num, const char *file, int line)
          157.   {
          158. >     void *ret = CRYPTO_malloc(num, file, line);
          159.   
          160.       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 (num <= 0)

crypto/mem.c:123:9: Taking false branch
            121.       void *ret = NULL;
            122.   
            123.       if (num <= 0)
                           ^
            124.           return NULL;
            125.   

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

crypto/mem.c:136:5: 
            134.       }
            135.   #else
            136. >     (void)file;
            137.       (void)line;
            138.       ret = malloc(num);

crypto/mem.c:137:5: 
            135.   #else
            136.       (void)file;
            137. >     (void)line;
            138.       ret = malloc(num);
            139.   #endif

crypto/mem.c:138:5: 
            136.       (void)file;
            137.       (void)line;
            138. >     ret = malloc(num);
            139.   #endif
            140.   

crypto/mem.c:153:5: 
            151.   #endif
            152.   
            153. >     return ret;
            154.   }
            155.   

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

crypto/mem.c:160:9: Taking true branch
          158.       void *ret = CRYPTO_malloc(num, file, line);
          159.   
          160.       if (ret != NULL)
                         ^
          161.           memset(ret, 0, num);
          162.       return ret;

crypto/mem.c:161:9: 
          159.   
          160.       if (ret != NULL)
          161. >         memset(ret, 0, num);
          162.       return ret;
          163.   }

crypto/mem.c:162:5: 
          160.       if (ret != NULL)
          161.           memset(ret, 0, num);
          162. >     return ret;
          163.   }
          164.   

crypto/mem.c:163:1: return from a call to CRYPTO_zalloc
          161.           memset(ret, 0, num);
          162.       return ret;
          163. > }
          164.   
          165.   void *CRYPTO_realloc(void *str, size_t num, const char *file, int line)

crypto/stack/stack.c:153:9: Taking false branch
        151.       _STACK *ret;
        152.   
        153.       if ((ret = OPENSSL_zalloc(sizeof(_STACK))) == NULL)
                       ^
        154.           goto err;
        155.       if ((ret->data = OPENSSL_zalloc(sizeof(*ret->data) * MIN_NODES)) == NULL)

crypto/stack/stack.c:155:9: 
        153.       if ((ret = OPENSSL_zalloc(sizeof(_STACK))) == NULL)
        154.           goto err;
        155. >     if ((ret->data = OPENSSL_zalloc(sizeof(*ret->data) * MIN_NODES)) == NULL)
        156.           goto err;
        157.       ret->comp = c;

crypto/mem.c:156:1: start of procedure CRYPTO_zalloc()
          154.   }
          155.   
          156. > void *CRYPTO_zalloc(size_t num, const char *file, int line)
          157.   {
          158.       void *ret = CRYPTO_malloc(num, file, line);

crypto/mem.c:158:5: 
          156.   void *CRYPTO_zalloc(size_t num, const char *file, int line)
          157.   {
          158. >     void *ret = CRYPTO_malloc(num, file, line);
          159.   
          160.       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 (num <= 0)

crypto/mem.c:123:9: Taking false branch
            121.       void *ret = NULL;
            122.   
            123.       if (num <= 0)
                           ^
            124.           return NULL;
            125.   

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

crypto/mem.c:136:5: 
            134.       }
            135.   #else
            136. >     (void)file;
            137.       (void)line;
            138.       ret = malloc(num);

crypto/mem.c:137:5: 
            135.   #else
            136.       (void)file;
            137. >     (void)line;
            138.       ret = malloc(num);
            139.   #endif

crypto/mem.c:138:5: 
            136.       (void)file;
            137.       (void)line;
            138. >     ret = malloc(num);
            139.   #endif
            140.   

crypto/mem.c:153:5: 
            151.   #endif
            152.   
            153. >     return ret;
            154.   }
            155.   

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

crypto/mem.c:160:9: Taking true branch
          158.       void *ret = CRYPTO_malloc(num, file, line);
          159.   
          160.       if (ret != NULL)
                         ^
          161.           memset(ret, 0, num);
          162.       return ret;

crypto/mem.c:161:9: 
          159.   
          160.       if (ret != NULL)
          161. >         memset(ret, 0, num);
          162.       return ret;
          163.   }

crypto/mem.c:162:5: 
          160.       if (ret != NULL)
          161.           memset(ret, 0, num);
          162. >     return ret;
          163.   }
          164.   

crypto/mem.c:163:1: return from a call to CRYPTO_zalloc
          161.           memset(ret, 0, num);
          162.       return ret;
          163. > }
          164.   
          165.   void *CRYPTO_realloc(void *str, size_t num, const char *file, int line)

crypto/stack/stack.c:155:9: Taking false branch
        153.       if ((ret = OPENSSL_zalloc(sizeof(_STACK))) == NULL)
        154.           goto err;
        155.       if ((ret->data = OPENSSL_zalloc(sizeof(*ret->data) * MIN_NODES)) == NULL)
                       ^
        156.           goto err;
        157.       ret->comp = c;

crypto/stack/stack.c:157:5: 
        155.       if ((ret->data = OPENSSL_zalloc(sizeof(*ret->data) * MIN_NODES)) == NULL)
        156.           goto err;
        157. >     ret->comp = c;
        158.       ret->num_alloc = MIN_NODES;
        159.       return (ret);

crypto/stack/stack.c:158:5: 
        156.           goto err;
        157.       ret->comp = c;
        158. >     ret->num_alloc = MIN_NODES;
        159.       return (ret);
        160.   

crypto/stack/stack.c:159:5: 
        157.       ret->comp = c;
        158.       ret->num_alloc = MIN_NODES;
        159. >     return (ret);
        160.   
        161.    err:

crypto/stack/stack.c:164:1: return from a call to sk_new
        162.       OPENSSL_free(ret);
        163.       return (NULL);
        164. > }
        165.   
        166.   int sk_insert(_STACK *st, void *data, int loc)

crypto/stack/stack.c:147:1: return from a call to sk_new_null
      145.   {
      146.       return sk_new((int (*)(const void *, const void *))0);
      147. > }
      148.   
      149.   _STACK *sk_new(int (*c) (const void *, const void *))

include/openssl/conf.h:79:1: return from a call to sk_CONF_VALUE_new_null
    77.   } CONF_VALUE;
    78.   
    79. > DEFINE_STACK_OF(CONF_VALUE)
    80.   DEFINE_LHASH_OF(CONF_VALUE);
    81.   

crypto/conf/conf_api.c:248:9: Taking false branch
  246.       CONF_VALUE *v = NULL, *vv;
  247.   
  248.       if ((sk = sk_CONF_VALUE_new_null()) == NULL)
                 ^
  249.           goto err;
  250.       if ((v = OPENSSL_malloc(sizeof(*v))) == NULL)

crypto/conf/conf_api.c:250:9: 
  248.       if ((sk = sk_CONF_VALUE_new_null()) == NULL)
  249.           goto err;
  250. >     if ((v = OPENSSL_malloc(sizeof(*v))) == NULL)
  251.           goto err;
  252.       i = strlen(section) + 1;

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 (num <= 0)

crypto/mem.c:123:9: Taking false branch
    121.       void *ret = NULL;
    122.   
    123.       if (num <= 0)
                   ^
    124.           return NULL;
    125.   

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

crypto/mem.c:136:5: 
    134.       }
    135.   #else
    136. >     (void)file;
    137.       (void)line;
    138.       ret = malloc(num);

crypto/mem.c:137:5: 
    135.   #else
    136.       (void)file;
    137. >     (void)line;
    138.       ret = malloc(num);
    139.   #endif

crypto/mem.c:138:5: 
    136.       (void)file;
    137.       (void)line;
    138. >     ret = malloc(num);
    139.   #endif
    140.   

crypto/mem.c:153:5: 
    151.   #endif
    152.   
    153. >     return ret;
    154.   }
    155.   

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

crypto/conf/conf_api.c:250:9: Taking false branch
  248.       if ((sk = sk_CONF_VALUE_new_null()) == NULL)
  249.           goto err;
  250.       if ((v = OPENSSL_malloc(sizeof(*v))) == NULL)
                 ^
  251.           goto err;
  252.       i = strlen(section) + 1;

crypto/conf/conf_api.c:252:5: 
  250.       if ((v = OPENSSL_malloc(sizeof(*v))) == NULL)
  251.           goto err;
  252. >     i = strlen(section) + 1;
  253.       if ((v->section = OPENSSL_malloc(i)) == NULL)
  254.           goto err;

crypto/conf/conf_api.c:253:9: 
  251.           goto err;
  252.       i = strlen(section) + 1;
  253. >     if ((v->section = OPENSSL_malloc(i)) == NULL)
  254.           goto err;
  255.   

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 (num <= 0)

crypto/mem.c:123:9: Taking false branch
    121.       void *ret = NULL;
    122.   
    123.       if (num <= 0)
                   ^
    124.           return NULL;
    125.   

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

crypto/mem.c:136:5: 
    134.       }
    135.   #else
    136. >     (void)file;
    137.       (void)line;
    138.       ret = malloc(num);

crypto/mem.c:137:5: 
    135.   #else
    136.       (void)file;
    137. >     (void)line;
    138.       ret = malloc(num);
    139.   #endif

crypto/mem.c:138:5: 
    136.       (void)file;
    137.       (void)line;
    138. >     ret = malloc(num);
    139.   #endif
    140.   

crypto/mem.c:153:5: 
    151.   #endif
    152.   
    153. >     return ret;
    154.   }
    155.   

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

crypto/conf/conf_api.c:253:9: Taking false branch
  251.           goto err;
  252.       i = strlen(section) + 1;
  253.       if ((v->section = OPENSSL_malloc(i)) == NULL)
                 ^
  254.           goto err;
  255.   

crypto/conf/conf_api.c:256:5: 
  254.           goto err;
  255.   
  256. >     memcpy(v->section, section, i);
  257.       v->name = NULL;
  258.       v->value = (char *)sk;

crypto/conf/conf_api.c:257:5: 
  255.   
  256.       memcpy(v->section, section, i);
  257. >     v->name = NULL;
  258.       v->value = (char *)sk;
  259.   

crypto/conf/conf_api.c:258:5: 
  256.       memcpy(v->section, section, i);
  257.       v->name = NULL;
  258. >     v->value = (char *)sk;
  259.   
  260.       vv = lh_CONF_VALUE_insert(conf->data, v);

crypto/conf/conf_api.c:260:5: 
  258.       v->value = (char *)sk;
  259.   
  260. >     vv = lh_CONF_VALUE_insert(conf->data, v);
  261.       OPENSSL_assert(vv == NULL);
  262.       return v;

include/openssl/conf.h:80:1: start of procedure lh_CONF_VALUE_insert()
    78.   
    79.   DEFINE_STACK_OF(CONF_VALUE)
    80. > DEFINE_LHASH_OF(CONF_VALUE);
    81.   
    82.   struct conf_st;

crypto/lhash/lhash.c:155:1: start of procedure lh_insert()
      153.   }
      154.   
      155. > void *lh_insert(_LHASH *lh, void *data)
      156.   {
      157.       unsigned long hash;

crypto/lhash/lhash.c:161:5: 
      159.       void *ret;
      160.   
      161. >     lh->error = 0;
      162.       if (lh->up_load <= (lh->num_items * LH_LOAD_MULT / lh->num_nodes))
      163.           expand(lh);

crypto/lhash/lhash.c:162:9: Taking false branch
      160.   
      161.       lh->error = 0;
      162.       if (lh->up_load <= (lh->num_items * LH_LOAD_MULT / lh->num_nodes))
                     ^
      163.           expand(lh);
      164.   

crypto/lhash/lhash.c:165:5: Skipping getrn(): empty list of specs
      163.           expand(lh);
      164.   
      165.       rn = getrn(lh, data, &hash);
                 ^
      166.   
      167.       if (*rn == NULL) {

crypto/lhash/lhash.c:167:9: Taking true branch
      165.       rn = getrn(lh, data, &hash);
      166.   
      167.       if (*rn == NULL) {
                     ^
      168.           if ((nn = OPENSSL_malloc(sizeof(*nn))) == NULL) {
      169.               lh->error++;

crypto/lhash/lhash.c:168:13: 
      166.   
      167.       if (*rn == NULL) {
      168. >         if ((nn = OPENSSL_malloc(sizeof(*nn))) == NULL) {
      169.               lh->error++;
      170.               return (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 (num <= 0)

crypto/mem.c:123:9: Taking false branch
        121.       void *ret = NULL;
        122.   
        123.       if (num <= 0)
                       ^
        124.           return NULL;
        125.   

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

crypto/mem.c:136:5: 
        134.       }
        135.   #else
        136. >     (void)file;
        137.       (void)line;
        138.       ret = malloc(num);

crypto/mem.c:137:5: 
        135.   #else
        136.       (void)file;
        137. >     (void)line;
        138.       ret = malloc(num);
        139.   #endif

crypto/mem.c:138:5: 
        136.       (void)file;
        137.       (void)line;
        138. >     ret = malloc(num);
        139.   #endif
        140.   

crypto/mem.c:153:5: 
        151.   #endif
        152.   
        153. >     return ret;
        154.   }
        155.   

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

crypto/lhash/lhash.c:168:13: Taking false branch
      166.   
      167.       if (*rn == NULL) {
      168.           if ((nn = OPENSSL_malloc(sizeof(*nn))) == NULL) {
                         ^
      169.               lh->error++;
      170.               return (NULL);

crypto/lhash/lhash.c:172:9: 
      170.               return (NULL);
      171.           }
      172. >         nn->data = data;
      173.           nn->next = NULL;
      174.           nn->hash = hash;

crypto/lhash/lhash.c:173:9: 
      171.           }
      172.           nn->data = data;
      173. >         nn->next = NULL;
      174.           nn->hash = hash;
      175.           *rn = nn;

crypto/lhash/lhash.c:174:9: 
      172.           nn->data = data;
      173.           nn->next = NULL;
      174. >         nn->hash = hash;
      175.           *rn = nn;
      176.           ret = NULL;

crypto/lhash/lhash.c:175:9: 
      173.           nn->next = NULL;
      174.           nn->hash = hash;
      175. >         *rn = nn;
      176.           ret = NULL;
      177.           lh->num_insert++;

crypto/lhash/lhash.c:176:9: 
      174.           nn->hash = hash;
      175.           *rn = nn;
      176. >         ret = NULL;
      177.           lh->num_insert++;
      178.           lh->num_items++;

crypto/lhash/lhash.c:177:9: 
      175.           *rn = nn;
      176.           ret = NULL;
      177. >         lh->num_insert++;
      178.           lh->num_items++;
      179.       } else {                    /* replace same key */

crypto/lhash/lhash.c:178:9: 
      176.           ret = NULL;
      177.           lh->num_insert++;
      178. >         lh->num_items++;
      179.       } else {                    /* replace same key */
      180.   

crypto/lhash/lhash.c:185:5: 
      183.           lh->num_replace++;
      184.       }
      185. >     return (ret);
      186.   }
      187.   

crypto/lhash/lhash.c:186:1: return from a call to lh_insert
      184.       }
      185.       return (ret);
      186. > }
      187.   
      188.   void *lh_delete(_LHASH *lh, const void *data)

include/openssl/conf.h:80:1: return from a call to lh_CONF_VALUE_insert
    78.   
    79.   DEFINE_STACK_OF(CONF_VALUE)
    80. > DEFINE_LHASH_OF(CONF_VALUE);
    81.   
    82.   struct conf_st;

crypto/conf/conf_api.c:261:5: Condition is true
  259.   
  260.       vv = lh_CONF_VALUE_insert(conf->data, v);
  261.       OPENSSL_assert(vv == NULL);
             ^
  262.       return v;
  263.   

crypto/conf/conf_api.c:262:5: 
  260.       vv = lh_CONF_VALUE_insert(conf->data, v);
  261.       OPENSSL_assert(vv == NULL);
  262. >     return v;
  263.   
  264.    err:

crypto/conf/conf_api.c:268:1: return from a call to _CONF_new_section
  266.       OPENSSL_free(v);
  267.       return NULL;
  268. > }

crypto/conf/conf_def.c:237:9: Taking false branch
235.   
236.       sv = _CONF_new_section(conf, section);
237.       if (sv == NULL) {
               ^
238.           CONFerr(CONF_F_DEF_LOAD_BIO, CONF_R_UNABLE_TO_CREATE_NEW_SECTION);
239.           goto err;

crypto/conf/conf_def.c:242:5: 
240.       }
241.   
242. >     bufnum = 0;
243.       again = 0;
244.       for (;;) {

crypto/conf/conf_def.c:243:5: 
241.   
242.       bufnum = 0;
243. >     again = 0;
244.       for (;;) {
245.           if (!BUF_MEM_grow(buff, bufnum + CONFBUFSIZE)) {

crypto/conf/conf_def.c:389:5: Loop condition is true. Entering loop body
387.               v = NULL;
388.           }
389.       }
           ^
390.       BUF_MEM_free(buff);
391.       OPENSSL_free(section);

crypto/conf/conf_def.c:245:14: Taking true branch
243.       again = 0;
244.       for (;;) {
245.           if (!BUF_MEM_grow(buff, bufnum + CONFBUFSIZE)) {
                    ^
246.               CONFerr(CONF_F_DEF_LOAD_BIO, ERR_R_BUF_LIB);
247.               goto err;

crypto/conf/conf_def.c:246:13: Skipping ERR_put_error(): empty list of specs
244.       for (;;) {
245.           if (!BUF_MEM_grow(buff, bufnum + CONFBUFSIZE)) {
246.               CONFerr(CONF_F_DEF_LOAD_BIO, ERR_R_BUF_LIB);
                   ^
247.               goto err;
248.           }

static int def_load_bio(CONF *conf, BIO *in, long *line)
{
#define CONFBUFSIZE     512
    int bufnum = 0, i, ii;
    BUF_MEM *buff = NULL;
    char *s, *p, *end;
    int again;
    long eline = 0;
    char btmp[DECIMAL_SIZE(eline) + 1];
    CONF_VALUE *v = NULL, *tv;
    CONF_VALUE *sv = NULL;
    char *section = NULL, *buf;
    char *start, *psection, *pname;
    void *h = (void *)(conf->data);
    if ((buff = BUF_MEM_new()) == NULL) {
        CONFerr(CONF_F_DEF_LOAD_BIO, ERR_R_BUF_LIB);
        goto err;
    }
    section = OPENSSL_strdup("default");
    if (section == NULL) {
        CONFerr(CONF_F_DEF_LOAD_BIO, ERR_R_MALLOC_FAILURE);
        goto err;
    }
    if (_CONF_new_data(conf) == 0) {
        CONFerr(CONF_F_DEF_LOAD_BIO, ERR_R_MALLOC_FAILURE);
        goto err;
    }
    sv = _CONF_new_section(conf, section);
    if (sv == NULL) {
        CONFerr(CONF_F_DEF_LOAD_BIO, CONF_R_UNABLE_TO_CREATE_NEW_SECTION);
        goto err;
    }
    bufnum = 0;
    again = 0;
    for (;;) {
        if (!BUF_MEM_grow(buff, bufnum + CONFBUFSIZE)) {
            CONFerr(CONF_F_DEF_LOAD_BIO, ERR_R_BUF_LIB);
            goto err;
        }
        p = &(buff->data[bufnum]);
        *p = '\0';
        BIO_gets(in, p, CONFBUFSIZE - 1);
        p[CONFBUFSIZE - 1] = '\0';
        ii = i = strlen(p);
        if (i == 0 && !again)
            break;
        again = 0;
        while (i > 0) {
            if ((p[i - 1] != '\r') && (p[i - 1] != '\n'))
                break;
            else
                i--;
        }
        if (ii && i == ii)
            again = 1;
        else {
            p[i] = '\0';
            eline++;
        }
        bufnum += i;
        v = NULL;
        if (bufnum >= 1) {
            p = &(buff->data[bufnum - 1]);
            if (IS_ESC(conf, p[0]) && ((bufnum <= 1) || !IS_ESC(conf, p[-1]))) {
                bufnum--;
                again = 1;
            }
        }
        if (again)
            continue;
        bufnum = 0;
        buf = buff->data;
        clear_comments(conf, buf);
        s = eat_ws(conf, buf);
        if (IS_EOF(conf, *s))
            continue;
        if (*s == '[') {
            char *ss;
            s++;
            start = eat_ws(conf, s);
            ss = start;
 again:
            end = eat_alpha_numeric(conf, ss);
            p = eat_ws(conf, end);
            if (*p != ']') {
                if (*p != '\0' && ss != p) {
                    ss = p;
                    goto again;
                }
                CONFerr(CONF_F_DEF_LOAD_BIO,
                        CONF_R_MISSING_CLOSE_SQUARE_BRACKET);
                goto err;
            }
            *end = '\0';
            if (!str_copy(conf, NULL, &section, start))
                goto err;
            if ((sv = _CONF_get_section(conf, section)) == NULL)
                sv = _CONF_new_section(conf, section);
            if (sv == NULL) {
                CONFerr(CONF_F_DEF_LOAD_BIO,
                        CONF_R_UNABLE_TO_CREATE_NEW_SECTION);
                goto err;
            }
            continue;
        } else {
            pname = s;
            psection = NULL;
            end = eat_alpha_numeric(conf, s);
            if ((end[0] == ':') && (end[1] == ':')) {
                *end = '\0';
                end += 2;
                psection = pname;
                pname = end;
                end = eat_alpha_numeric(conf, end);
            }
            p = eat_ws(conf, end);
            if (*p != '=') {
                CONFerr(CONF_F_DEF_LOAD_BIO, CONF_R_MISSING_EQUAL_SIGN);
                goto err;
            }
            *end = '\0';
            p++;
            start = eat_ws(conf, p);
            while (!IS_EOF(conf, *p))
                p++;
            p--;
            while ((p != start) && (IS_WS(conf, *p)))
                p--;
            p++;
            *p = '\0';
            if ((v = OPENSSL_malloc(sizeof(*v))) == NULL) {
                CONFerr(CONF_F_DEF_LOAD_BIO, ERR_R_MALLOC_FAILURE);
                goto err;
            }
            if (psection == NULL)
                psection = section;
            v->name = OPENSSL_malloc(strlen(pname) + 1);
            v->value = NULL;
            if (v->name == NULL) {
                CONFerr(CONF_F_DEF_LOAD_BIO, ERR_R_MALLOC_FAILURE);
                goto err;
            }
            OPENSSL_strlcpy(v->name, pname, strlen(pname) + 1);
            if (!str_copy(conf, psection, &(v->value), start))
                goto err;
            if (strcmp(psection, section) != 0) {
                if ((tv = _CONF_get_section(conf, psection))
                    == NULL)
                    tv = _CONF_new_section(conf, psection);
                if (tv == NULL) {
                    CONFerr(CONF_F_DEF_LOAD_BIO,
                            CONF_R_UNABLE_TO_CREATE_NEW_SECTION);
                    goto err;
                }
            } else
                tv = sv;
            if (_CONF_add_string(conf, tv, v) == 0) {
                CONFerr(CONF_F_DEF_LOAD_BIO, ERR_R_MALLOC_FAILURE);
                goto err;
            }
            v = NULL;
        }
    }
    BUF_MEM_free(buff);
    OPENSSL_free(section);
    return (1);
 err:
    BUF_MEM_free(buff);
    OPENSSL_free(section);
    if (line != NULL)
        *line = eline;
    BIO_snprintf(btmp, sizeof btmp, "%ld", eline);
    ERR_add_error_data(2, "line ", btmp);
    if (h != conf->data) {
        CONF_free(conf->data);
        conf->data = NULL;
    }
    if (v != NULL) {
        OPENSSL_free(v->name);
        OPENSSL_free(v->value);
        OPENSSL_free(v);
    }
    return (0);
}
['static int def_load_bio(CONF *conf, BIO *in, long *line)\n{\n#define CONFBUFSIZE     512\n    int bufnum = 0, i, ii;\n    BUF_MEM *buff = NULL;\n    char *s, *p, *end;\n    int again;\n    long eline = 0;\n    char btmp[DECIMAL_SIZE(eline) + 1];\n    CONF_VALUE *v = NULL, *tv;\n    CONF_VALUE *sv = NULL;\n    char *section = NULL, *buf;\n    char *start, *psection, *pname;\n    void *h = (void *)(conf->data);\n    if ((buff = BUF_MEM_new()) == NULL) {\n        CONFerr(CONF_F_DEF_LOAD_BIO, ERR_R_BUF_LIB);\n        goto err;\n    }\n    section = OPENSSL_strdup("default");\n    if (section == NULL) {\n        CONFerr(CONF_F_DEF_LOAD_BIO, ERR_R_MALLOC_FAILURE);\n        goto err;\n    }\n    if (_CONF_new_data(conf) == 0) {\n        CONFerr(CONF_F_DEF_LOAD_BIO, ERR_R_MALLOC_FAILURE);\n        goto err;\n    }\n    sv = _CONF_new_section(conf, section);\n    if (sv == NULL) {\n        CONFerr(CONF_F_DEF_LOAD_BIO, CONF_R_UNABLE_TO_CREATE_NEW_SECTION);\n        goto err;\n    }\n    bufnum = 0;\n    again = 0;\n    for (;;) {\n        if (!BUF_MEM_grow(buff, bufnum + CONFBUFSIZE)) {\n            CONFerr(CONF_F_DEF_LOAD_BIO, ERR_R_BUF_LIB);\n            goto err;\n        }\n        p = &(buff->data[bufnum]);\n        *p = \'\\0\';\n        BIO_gets(in, p, CONFBUFSIZE - 1);\n        p[CONFBUFSIZE - 1] = \'\\0\';\n        ii = i = strlen(p);\n        if (i == 0 && !again)\n            break;\n        again = 0;\n        while (i > 0) {\n            if ((p[i - 1] != \'\\r\') && (p[i - 1] != \'\\n\'))\n                break;\n            else\n                i--;\n        }\n        if (ii && i == ii)\n            again = 1;\n        else {\n            p[i] = \'\\0\';\n            eline++;\n        }\n        bufnum += i;\n        v = NULL;\n        if (bufnum >= 1) {\n            p = &(buff->data[bufnum - 1]);\n            if (IS_ESC(conf, p[0]) && ((bufnum <= 1) || !IS_ESC(conf, p[-1]))) {\n                bufnum--;\n                again = 1;\n            }\n        }\n        if (again)\n            continue;\n        bufnum = 0;\n        buf = buff->data;\n        clear_comments(conf, buf);\n        s = eat_ws(conf, buf);\n        if (IS_EOF(conf, *s))\n            continue;\n        if (*s == \'[\') {\n            char *ss;\n            s++;\n            start = eat_ws(conf, s);\n            ss = start;\n again:\n            end = eat_alpha_numeric(conf, ss);\n            p = eat_ws(conf, end);\n            if (*p != \']\') {\n                if (*p != \'\\0\' && ss != p) {\n                    ss = p;\n                    goto again;\n                }\n                CONFerr(CONF_F_DEF_LOAD_BIO,\n                        CONF_R_MISSING_CLOSE_SQUARE_BRACKET);\n                goto err;\n            }\n            *end = \'\\0\';\n            if (!str_copy(conf, NULL, &section, start))\n                goto err;\n            if ((sv = _CONF_get_section(conf, section)) == NULL)\n                sv = _CONF_new_section(conf, section);\n            if (sv == NULL) {\n                CONFerr(CONF_F_DEF_LOAD_BIO,\n                        CONF_R_UNABLE_TO_CREATE_NEW_SECTION);\n                goto err;\n            }\n            continue;\n        } else {\n            pname = s;\n            psection = NULL;\n            end = eat_alpha_numeric(conf, s);\n            if ((end[0] == \':\') && (end[1] == \':\')) {\n                *end = \'\\0\';\n                end += 2;\n                psection = pname;\n                pname = end;\n                end = eat_alpha_numeric(conf, end);\n            }\n            p = eat_ws(conf, end);\n            if (*p != \'=\') {\n                CONFerr(CONF_F_DEF_LOAD_BIO, CONF_R_MISSING_EQUAL_SIGN);\n                goto err;\n            }\n            *end = \'\\0\';\n            p++;\n            start = eat_ws(conf, p);\n            while (!IS_EOF(conf, *p))\n                p++;\n            p--;\n            while ((p != start) && (IS_WS(conf, *p)))\n                p--;\n            p++;\n            *p = \'\\0\';\n            if ((v = OPENSSL_malloc(sizeof(*v))) == NULL) {\n                CONFerr(CONF_F_DEF_LOAD_BIO, ERR_R_MALLOC_FAILURE);\n                goto err;\n            }\n            if (psection == NULL)\n                psection = section;\n            v->name = OPENSSL_malloc(strlen(pname) + 1);\n            v->value = NULL;\n            if (v->name == NULL) {\n                CONFerr(CONF_F_DEF_LOAD_BIO, ERR_R_MALLOC_FAILURE);\n                goto err;\n            }\n            OPENSSL_strlcpy(v->name, pname, strlen(pname) + 1);\n            if (!str_copy(conf, psection, &(v->value), start))\n                goto err;\n            if (strcmp(psection, section) != 0) {\n                if ((tv = _CONF_get_section(conf, psection))\n                    == NULL)\n                    tv = _CONF_new_section(conf, psection);\n                if (tv == NULL) {\n                    CONFerr(CONF_F_DEF_LOAD_BIO,\n                            CONF_R_UNABLE_TO_CREATE_NEW_SECTION);\n                    goto err;\n                }\n            } else\n                tv = sv;\n            if (_CONF_add_string(conf, tv, v) == 0) {\n                CONFerr(CONF_F_DEF_LOAD_BIO, ERR_R_MALLOC_FAILURE);\n                goto err;\n            }\n            v = NULL;\n        }\n    }\n    BUF_MEM_free(buff);\n    OPENSSL_free(section);\n    return (1);\n err:\n    BUF_MEM_free(buff);\n    OPENSSL_free(section);\n    if (line != NULL)\n        *line = eline;\n    BIO_snprintf(btmp, sizeof btmp, "%ld", eline);\n    ERR_add_error_data(2, "line ", btmp);\n    if (h != conf->data) {\n        CONF_free(conf->data);\n        conf->data = NULL;\n    }\n    if (v != NULL) {\n        OPENSSL_free(v->name);\n        OPENSSL_free(v->value);\n        OPENSSL_free(v);\n    }\n    return (0);\n}', 'BUF_MEM *BUF_MEM_new(void)\n{\n    BUF_MEM *ret;\n    ret = OPENSSL_zalloc(sizeof(*ret));\n    if (ret == NULL) {\n        BUFerr(BUF_F_BUF_MEM_NEW, ERR_R_MALLOC_FAILURE);\n        return (NULL);\n    }\n    return (ret);\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 (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    size_t size;\n    if (str == NULL)\n        return NULL;\n    size = strlen(str) + 1;\n    ret = CRYPTO_malloc(size, file, line);\n    if (ret != NULL)\n        memcpy(ret, str, size);\n    return ret;\n}', 'int _CONF_new_data(CONF *conf)\n{\n    if (conf == NULL) {\n        return 0;\n    }\n    if (conf->data == NULL) {\n        conf->data = lh_CONF_VALUE_new(conf_value_hash, conf_value_cmp);\n        if (conf->data == NULL)\n            return 0;\n    }\n    return 1;\n}', 'CONF_VALUE *_CONF_new_section(CONF *conf, const char *section)\n{\n    STACK_OF(CONF_VALUE) *sk = NULL;\n    int i;\n    CONF_VALUE *v = NULL, *vv;\n    if ((sk = sk_CONF_VALUE_new_null()) == NULL)\n        goto err;\n    if ((v = OPENSSL_malloc(sizeof(*v))) == NULL)\n        goto err;\n    i = strlen(section) + 1;\n    if ((v->section = OPENSSL_malloc(i)) == NULL)\n        goto err;\n    memcpy(v->section, section, i);\n    v->name = NULL;\n    v->value = (char *)sk;\n    vv = lh_CONF_VALUE_insert(conf->data, v);\n    OPENSSL_assert(vv == NULL);\n    return v;\n err:\n    sk_CONF_VALUE_free(sk);\n    OPENSSL_free(v);\n    return NULL;\n}', '_STACK *sk_new_null(void)\n{\n    return sk_new((int (*)(const void *, const void *))0);\n}', '_STACK *sk_new(int (*c) (const void *, const void *))\n{\n    _STACK *ret;\n    if ((ret = OPENSSL_zalloc(sizeof(_STACK))) == NULL)\n        goto err;\n    if ((ret->data = OPENSSL_zalloc(sizeof(*ret->data) * MIN_NODES)) == NULL)\n        goto err;\n    ret->comp = c;\n    ret->num_alloc = MIN_NODES;\n    return (ret);\n err:\n    OPENSSL_free(ret);\n    return (NULL);\n}', 'void *lh_insert(_LHASH *lh, void *data)\n{\n    unsigned long hash;\n    LHASH_NODE *nn, **rn;\n    void *ret;\n    lh->error = 0;\n    if (lh->up_load <= (lh->num_items * LH_LOAD_MULT / lh->num_nodes))\n        expand(lh);\n    rn = getrn(lh, data, &hash);\n    if (*rn == NULL) {\n        if ((nn = OPENSSL_malloc(sizeof(*nn))) == NULL) {\n            lh->error++;\n            return (NULL);\n        }\n        nn->data = data;\n        nn->next = NULL;\n        nn->hash = hash;\n        *rn = nn;\n        ret = NULL;\n        lh->num_insert++;\n        lh->num_items++;\n    } else {\n        ret = (*rn)->data;\n        (*rn)->data = data;\n        lh->num_replace++;\n    }\n    return (ret);\n}']