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


ssl/record/ssl3_buffer.c:219:1: start of procedure ssl3_setup_buffers()
217.   }
218.   
219. > int ssl3_setup_buffers(SSL *s)
220.   {
221.       if (!ssl3_setup_read_buffer(s))

ssl/record/ssl3_buffer.c:221:10: 
219.   int ssl3_setup_buffers(SSL *s)
220.   {
221. >     if (!ssl3_setup_read_buffer(s))
222.           return 0;
223.       if (!ssl3_setup_write_buffer(s))

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

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

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

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

ssl/record/ssl3_buffer.c:150:9: 
  148.   
  149.       if (SSL_IS_DTLS(s))
  150. >         headerlen = DTLS1_RT_HEADER_LENGTH;
  151.       else
  152.           headerlen = SSL3_RT_HEADER_LENGTH;

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

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

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

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

ssl/record/ssl3_buffer.c:165:13: 
  163.               len += SSL3_RT_MAX_COMPRESSED_OVERHEAD;
  164.   #endif
  165. >         if ((p = OPENSSL_malloc(len)) == NULL)
  166.               goto err;
  167.           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:155:5: 
    153.   #endif
    154.   
    155. >     return ret;
    156.   }
    157.   

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

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

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

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

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

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

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

ssl/record/ssl3_buffer.c:221:10: Taking false branch
219.   int ssl3_setup_buffers(SSL *s)
220.   {
221.       if (!ssl3_setup_read_buffer(s))
                ^
222.           return 0;
223.       if (!ssl3_setup_write_buffer(s))

ssl/record/ssl3_buffer.c:223:10: Skipping ssl3_setup_write_buffer(): empty list of specs
221.       if (!ssl3_setup_read_buffer(s))
222.           return 0;
223.       if (!ssl3_setup_write_buffer(s))
                ^
224.           return 0;
225.       return 1;
