ssl/d1_lib.c:139: error: MEMORY_LEAK
  memory dynamically allocated by call to `DTLS_RECORD_LAYER_new()` at line 135, column 10 is not reachable after line 139, column 10.
Showing all 82 steps of the trace


ssl/d1_lib.c:131:1: start of procedure dtls1_new()
129.   }
130.   
131. > int dtls1_new(SSL *s)
132.   {
133.       DTLS1_STATE *d1;

ssl/d1_lib.c:135:10: 
133.       DTLS1_STATE *d1;
134.   
135. >     if (!DTLS_RECORD_LAYER_new(&s->rlayer)) {
136.           return 0;
137.       }

ssl/record/rec_layer_d1.c:126:1: start of procedure DTLS_RECORD_LAYER_new()
  124.   #include "record_locl.h"
  125.   
  126. > int DTLS_RECORD_LAYER_new(RECORD_LAYER *rl)
  127.   {
  128.       DTLS_RECORD_LAYER *d;

ssl/record/rec_layer_d1.c:130:9: 
  128.       DTLS_RECORD_LAYER *d;
  129.       
  130. >     if ((d = OPENSSL_malloc(sizeof(*d))) == NULL)
  131.           return (0);
  132.   

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

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

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

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

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

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

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

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

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

ssl/record/rec_layer_d1.c:130:9: Taking false branch
  128.       DTLS_RECORD_LAYER *d;
  129.       
  130.       if ((d = OPENSSL_malloc(sizeof(*d))) == NULL)
                 ^
  131.           return (0);
  132.   

ssl/record/rec_layer_d1.c:134:5: 
  132.   
  133.   
  134. >     rl->d = d;
  135.   
  136.       d->unprocessed_rcds.q = pqueue_new();

ssl/record/rec_layer_d1.c:136:5: 
  134.       rl->d = d;
  135.   
  136. >     d->unprocessed_rcds.q = pqueue_new();
  137.       d->processed_rcds.q = pqueue_new();
  138.       d->buffered_app_data.q = pqueue_new();

crypto/pqueue/pqueue.c:88:1: start of procedure pqueue_new()
    86.   }
    87.   
    88. > pqueue_s *pqueue_new()
    89.   {
    90.       pqueue_s *pq = OPENSSL_zalloc(sizeof(*pq));

crypto/pqueue/pqueue.c:90:5: 
    88.   pqueue_s *pqueue_new()
    89.   {
    90. >     pqueue_s *pq = OPENSSL_zalloc(sizeof(*pq));
    91.   
    92.       return pq;

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

crypto/mem.c:159:5: 
      157.   void *CRYPTO_zalloc(size_t num, const char *file, int line)
      158.   {
      159. >     void *ret = CRYPTO_malloc(num, file, line);
      160.   
      161.       if (ret != NULL)

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

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

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

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

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

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

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

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

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

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

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

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

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

crypto/pqueue/pqueue.c:92:5: 
    90.       pqueue_s *pq = OPENSSL_zalloc(sizeof(*pq));
    91.   
    92. >     return pq;
    93.   }
    94.   

crypto/pqueue/pqueue.c:93:1: return from a call to pqueue_new
    91.   
    92.       return pq;
    93. > }
    94.   
    95.   void pqueue_free(pqueue_s *pq)

ssl/record/rec_layer_d1.c:137:5: 
  135.   
  136.       d->unprocessed_rcds.q = pqueue_new();
  137. >     d->processed_rcds.q = pqueue_new();
  138.       d->buffered_app_data.q = pqueue_new();
  139.   

crypto/pqueue/pqueue.c:88:1: start of procedure pqueue_new()
    86.   }
    87.   
    88. > pqueue_s *pqueue_new()
    89.   {
    90.       pqueue_s *pq = OPENSSL_zalloc(sizeof(*pq));

crypto/pqueue/pqueue.c:90:5: 
    88.   pqueue_s *pqueue_new()
    89.   {
    90. >     pqueue_s *pq = OPENSSL_zalloc(sizeof(*pq));
    91.   
    92.       return pq;

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

crypto/mem.c:159:5: 
      157.   void *CRYPTO_zalloc(size_t num, const char *file, int line)
      158.   {
      159. >     void *ret = CRYPTO_malloc(num, file, line);
      160.   
      161.       if (ret != NULL)

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

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

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

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

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

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

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

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

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

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

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

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

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

crypto/pqueue/pqueue.c:92:5: 
    90.       pqueue_s *pq = OPENSSL_zalloc(sizeof(*pq));
    91.   
    92. >     return pq;
    93.   }
    94.   

crypto/pqueue/pqueue.c:93:1: return from a call to pqueue_new
    91.   
    92.       return pq;
    93. > }
    94.   
    95.   void pqueue_free(pqueue_s *pq)

ssl/record/rec_layer_d1.c:138:5: 
  136.       d->unprocessed_rcds.q = pqueue_new();
  137.       d->processed_rcds.q = pqueue_new();
  138. >     d->buffered_app_data.q = pqueue_new();
  139.   
  140.       if (d->unprocessed_rcds.q == NULL || d->processed_rcds.q == NULL

crypto/pqueue/pqueue.c:88:1: start of procedure pqueue_new()
    86.   }
    87.   
    88. > pqueue_s *pqueue_new()
    89.   {
    90.       pqueue_s *pq = OPENSSL_zalloc(sizeof(*pq));

crypto/pqueue/pqueue.c:90:5: 
    88.   pqueue_s *pqueue_new()
    89.   {
    90. >     pqueue_s *pq = OPENSSL_zalloc(sizeof(*pq));
    91.   
    92.       return pq;

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

crypto/mem.c:159:5: 
      157.   void *CRYPTO_zalloc(size_t num, const char *file, int line)
      158.   {
      159. >     void *ret = CRYPTO_malloc(num, file, line);
      160.   
      161.       if (ret != NULL)

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

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

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

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

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

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

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

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

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

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

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

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

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

crypto/pqueue/pqueue.c:92:5: 
    90.       pqueue_s *pq = OPENSSL_zalloc(sizeof(*pq));
    91.   
    92. >     return pq;
    93.   }
    94.   

crypto/pqueue/pqueue.c:93:1: return from a call to pqueue_new
    91.   
    92.       return pq;
    93. > }
    94.   
    95.   void pqueue_free(pqueue_s *pq)

ssl/record/rec_layer_d1.c:140:9: Taking false branch
  138.       d->buffered_app_data.q = pqueue_new();
  139.   
  140.       if (d->unprocessed_rcds.q == NULL || d->processed_rcds.q == NULL
                 ^
  141.           || d->buffered_app_data.q == NULL) {
  142.           pqueue_free(d->unprocessed_rcds.q);

ssl/record/rec_layer_d1.c:140:42: Taking false branch
  138.       d->buffered_app_data.q = pqueue_new();
  139.   
  140.       if (d->unprocessed_rcds.q == NULL || d->processed_rcds.q == NULL
                                                  ^
  141.           || d->buffered_app_data.q == NULL) {
  142.           pqueue_free(d->unprocessed_rcds.q);

ssl/record/rec_layer_d1.c:141:12: Taking false branch
  139.   
  140.       if (d->unprocessed_rcds.q == NULL || d->processed_rcds.q == NULL
  141.           || d->buffered_app_data.q == NULL) {
                    ^
  142.           pqueue_free(d->unprocessed_rcds.q);
  143.           pqueue_free(d->processed_rcds.q);

ssl/record/rec_layer_d1.c:150:5: 
  148.       }
  149.   
  150. >     return 1;
  151.   }
  152.   

ssl/record/rec_layer_d1.c:151:1: return from a call to DTLS_RECORD_LAYER_new
  149.   
  150.       return 1;
  151. > }
  152.   
  153.   void DTLS_RECORD_LAYER_free(RECORD_LAYER *rl)

ssl/d1_lib.c:135:10: Taking false branch
133.       DTLS1_STATE *d1;
134.   
135.       if (!DTLS_RECORD_LAYER_new(&s->rlayer)) {
                ^
136.           return 0;
137.       }

ssl/d1_lib.c:139:10: Skipping ssl3_new(): empty list of specs
137.       }
138.       
139.       if (!ssl3_new(s))
                ^
140.           return (0);
141.       if ((d1 = OPENSSL_zalloc(sizeof(*d1))) == NULL) {
