ssl/record/ssl3_buffer.c:229: error: MEMORY_LEAK
  memory dynamically allocated by call to `ssl3_setup_read_buffer()` at line 227, column 10 is not reachable after line 229, column 10.
Showing all 31 steps of the trace


ssl/record/ssl3_buffer.c:225:1: start of procedure ssl3_setup_buffers()
223.   }
224.   
225. > int ssl3_setup_buffers(SSL *s)
226.   {
227.       if (!ssl3_setup_read_buffer(s))

ssl/record/ssl3_buffer.c:227:10: 
225.   int ssl3_setup_buffers(SSL *s)
226.   {
227. >     if (!ssl3_setup_read_buffer(s))
228.           return 0;
229.       if (!ssl3_setup_write_buffer(s, 1))

ssl/record/ssl3_buffer.c:138:1: start of procedure ssl3_setup_read_buffer()
  136.   }
  137.   
  138. > int ssl3_setup_read_buffer(SSL *s)
  139.   {
  140.       unsigned char *p;

ssl/record/ssl3_buffer.c:141:5: 
  139.   {
  140.       unsigned char *p;
  141. >     size_t len, align = 0, headerlen;
  142.       SSL3_BUFFER *b;
  143.       

ssl/record/ssl3_buffer.c:144:5: 
  142.       SSL3_BUFFER *b;
  143.       
  144. >     b = RECORD_LAYER_get_rbuf(&s->rlayer);
  145.   
  146.       if (SSL_IS_DTLS(s))

ssl/record/ssl3_buffer.c:146:9: Taking true branch
  144.       b = RECORD_LAYER_get_rbuf(&s->rlayer);
  145.   
  146.       if (SSL_IS_DTLS(s))
                 ^
  147.           headerlen = DTLS1_RT_HEADER_LENGTH;
  148.       else

ssl/record/ssl3_buffer.c:147:9: 
  145.   
  146.       if (SSL_IS_DTLS(s))
  147. >         headerlen = DTLS1_RT_HEADER_LENGTH;
  148.       else
  149.           headerlen = SSL3_RT_HEADER_LENGTH;

ssl/record/ssl3_buffer.c:152:5: 
  150.   
  151.   #if defined(SSL3_ALIGN_PAYLOAD) && SSL3_ALIGN_PAYLOAD!=0
  152. >     align = (-SSL3_RT_HEADER_LENGTH) & (SSL3_ALIGN_PAYLOAD - 1);
  153.   #endif
  154.   

ssl/record/ssl3_buffer.c:155:9: Taking true branch
  153.   #endif
  154.   
  155.       if (b->buf == NULL) {
                 ^
  156.           len = SSL3_RT_MAX_PLAIN_LENGTH
  157.               + SSL3_RT_MAX_ENCRYPTED_OVERHEAD + headerlen + align;

ssl/record/ssl3_buffer.c:156:9: 
  154.   
  155.       if (b->buf == NULL) {
  156. >         len = SSL3_RT_MAX_PLAIN_LENGTH
  157.               + SSL3_RT_MAX_ENCRYPTED_OVERHEAD + headerlen + align;
  158.   #ifndef OPENSSL_NO_COMP

ssl/record/ssl3_buffer.c:159:13: Taking false branch
  157.               + SSL3_RT_MAX_ENCRYPTED_OVERHEAD + headerlen + align;
  158.   #ifndef OPENSSL_NO_COMP
  159.           if (ssl_allow_compression(s))
                     ^
  160.               len += SSL3_RT_MAX_COMPRESSED_OVERHEAD;
  161.   #endif

ssl/record/ssl3_buffer.c:162:13: Taking false branch
  160.               len += SSL3_RT_MAX_COMPRESSED_OVERHEAD;
  161.   #endif
  162.           if (b->default_len > len)
                     ^
  163.               len = b->default_len;
  164.           if ((p = OPENSSL_malloc(len)) == NULL)

ssl/record/ssl3_buffer.c:164:13: 
  162.           if (b->default_len > len)
  163.               len = b->default_len;
  164. >         if ((p = OPENSSL_malloc(len)) == NULL)
  165.               goto err;
  166.           b->buf = p;

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)

ssl/record/ssl3_buffer.c:164:13: Taking false branch
  162.           if (b->default_len > len)
  163.               len = b->default_len;
  164.           if ((p = OPENSSL_malloc(len)) == NULL)
                     ^
  165.               goto err;
  166.           b->buf = p;

ssl/record/ssl3_buffer.c:166:9: 
  164.           if ((p = OPENSSL_malloc(len)) == NULL)
  165.               goto err;
  166. >         b->buf = p;
  167.           b->len = len;
  168.       }

ssl/record/ssl3_buffer.c:167:9: 
  165.               goto err;
  166.           b->buf = p;
  167. >         b->len = len;
  168.       }
  169.   

ssl/record/ssl3_buffer.c:170:5: 
  168.       }
  169.   
  170. >     RECORD_LAYER_set_packet(&s->rlayer, &(b->buf[0]));
  171.       return 1;
  172.   

ssl/record/ssl3_buffer.c:171:5: 
  169.   
  170.       RECORD_LAYER_set_packet(&s->rlayer, &(b->buf[0]));
  171. >     return 1;
  172.   
  173.    err:

ssl/record/ssl3_buffer.c:176:1: return from a call to ssl3_setup_read_buffer
  174.       SSLerr(SSL_F_SSL3_SETUP_READ_BUFFER, ERR_R_MALLOC_FAILURE);
  175.       return 0;
  176. > }
  177.   
  178.   int ssl3_setup_write_buffer(SSL *s, unsigned int numwpipes)

ssl/record/ssl3_buffer.c:227:10: Taking false branch
225.   int ssl3_setup_buffers(SSL *s)
226.   {
227.       if (!ssl3_setup_read_buffer(s))
                ^
228.           return 0;
229.       if (!ssl3_setup_write_buffer(s, 1))

ssl/record/ssl3_buffer.c:229:10: Skipping ssl3_setup_write_buffer(): empty list of specs
227.       if (!ssl3_setup_read_buffer(s))
228.           return 0;
229.       if (!ssl3_setup_write_buffer(s, 1))
                ^
230.           return 0;
231.       return 1;
