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


ssl/record/ssl3_buffer.c:129:1: start of procedure ssl3_setup_buffers()
127.   }
128.   
129. > int ssl3_setup_buffers(SSL *s)
130.   {
131.       if (!ssl3_setup_read_buffer(s))

ssl/record/ssl3_buffer.c:131:10: 
129.   int ssl3_setup_buffers(SSL *s)
130.   {
131. >     if (!ssl3_setup_read_buffer(s))
132.           return 0;
133.       if (!ssl3_setup_write_buffer(s, 1, 0))

ssl/record/ssl3_buffer.c:37:1: start of procedure ssl3_setup_read_buffer()
  35.   }
  36.   
  37. > int ssl3_setup_read_buffer(SSL *s)
  38.   {
  39.       unsigned char *p;

ssl/record/ssl3_buffer.c:40:5: 
  38.   {
  39.       unsigned char *p;
  40. >     size_t len, align = 0, headerlen;
  41.       SSL3_BUFFER *b;
  42.   

ssl/record/ssl3_buffer.c:43:5: 
  41.       SSL3_BUFFER *b;
  42.   
  43. >     b = RECORD_LAYER_get_rbuf(&s->rlayer);
  44.   
  45.       if (SSL_IS_DTLS(s))

ssl/record/ssl3_buffer.c:45:9: Taking true branch
  43.       b = RECORD_LAYER_get_rbuf(&s->rlayer);
  44.   
  45.       if (SSL_IS_DTLS(s))
                ^
  46.           headerlen = DTLS1_RT_HEADER_LENGTH;
  47.       else

ssl/record/ssl3_buffer.c:46:9: 
  44.   
  45.       if (SSL_IS_DTLS(s))
  46. >         headerlen = DTLS1_RT_HEADER_LENGTH;
  47.       else
  48.           headerlen = SSL3_RT_HEADER_LENGTH;

ssl/record/ssl3_buffer.c:51:5: 
  49.   
  50.   #if defined(SSL3_ALIGN_PAYLOAD) && SSL3_ALIGN_PAYLOAD!=0
  51. >     align = (-SSL3_RT_HEADER_LENGTH) & (SSL3_ALIGN_PAYLOAD - 1);
  52.   #endif
  53.   

ssl/record/ssl3_buffer.c:54:9: Taking true branch
  52.   #endif
  53.   
  54.       if (b->buf == NULL) {
                ^
  55.           len = SSL3_RT_MAX_PLAIN_LENGTH
  56.               + SSL3_RT_MAX_ENCRYPTED_OVERHEAD + headerlen + align;

ssl/record/ssl3_buffer.c:55:9: 
  53.   
  54.       if (b->buf == NULL) {
  55. >         len = SSL3_RT_MAX_PLAIN_LENGTH
  56.               + SSL3_RT_MAX_ENCRYPTED_OVERHEAD + headerlen + align;
  57.   #ifndef OPENSSL_NO_COMP

ssl/record/ssl3_buffer.c:58:13: Taking false branch
  56.               + SSL3_RT_MAX_ENCRYPTED_OVERHEAD + headerlen + align;
  57.   #ifndef OPENSSL_NO_COMP
  58.           if (ssl_allow_compression(s))
                    ^
  59.               len += SSL3_RT_MAX_COMPRESSED_OVERHEAD;
  60.   #endif

ssl/record/ssl3_buffer.c:61:13: Taking false branch
  59.               len += SSL3_RT_MAX_COMPRESSED_OVERHEAD;
  60.   #endif
  61.           if (b->default_len > len)
                    ^
  62.               len = b->default_len;
  63.           if ((p = OPENSSL_malloc(len)) == NULL)

ssl/record/ssl3_buffer.c:63:13: 
  61.           if (b->default_len > len)
  62.               len = b->default_len;
  63. >         if ((p = OPENSSL_malloc(len)) == NULL)
  64.               goto err;
  65.           b->buf = p;

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

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

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

crypto/mem.c:164:9: Taking false branch
    162.           return malloc_impl(num, file, line);
    163.   
    164.       if (num <= 0)
                   ^
    165.           return NULL;
    166.   

crypto/mem.c:168:5: 
    166.   
    167.       FAILTEST();
    168. >     allow_customize = 0;
    169.   #ifndef OPENSSL_NO_CRYPTO_MDEBUG
    170.       if (call_malloc_debug) {

crypto/mem.c:178:5: 
    176.       }
    177.   #else
    178. >     osslargused(file); osslargused(line);
    179.       ret = malloc(num);
    180.   #endif

crypto/mem.c:178:24: 
    176.       }
    177.   #else
    178. >     osslargused(file); osslargused(line);
    179.       ret = malloc(num);
    180.   #endif

crypto/mem.c:179:5: 
    177.   #else
    178.       osslargused(file); osslargused(line);
    179. >     ret = malloc(num);
    180.   #endif
    181.   

crypto/mem.c:182:5: 
    180.   #endif
    181.   
    182. >     return ret;
    183.   }
    184.   

crypto/mem.c:183:1: return from a call to CRYPTO_malloc
    181.   
    182.       return ret;
    183. > }
    184.   
    185.   void *CRYPTO_zalloc(size_t num, const char *file, int line)

ssl/record/ssl3_buffer.c:63:13: Taking false branch
  61.           if (b->default_len > len)
  62.               len = b->default_len;
  63.           if ((p = OPENSSL_malloc(len)) == NULL)
                    ^
  64.               goto err;
  65.           b->buf = p;

ssl/record/ssl3_buffer.c:65:9: 
  63.           if ((p = OPENSSL_malloc(len)) == NULL)
  64.               goto err;
  65. >         b->buf = p;
  66.           b->len = len;
  67.       }

ssl/record/ssl3_buffer.c:66:9: 
  64.               goto err;
  65.           b->buf = p;
  66. >         b->len = len;
  67.       }
  68.   

ssl/record/ssl3_buffer.c:69:5: 
  67.       }
  68.   
  69. >     RECORD_LAYER_set_packet(&s->rlayer, &(b->buf[0]));
  70.       return 1;
  71.   

ssl/record/ssl3_buffer.c:70:5: 
  68.   
  69.       RECORD_LAYER_set_packet(&s->rlayer, &(b->buf[0]));
  70. >     return 1;
  71.   
  72.    err:

ssl/record/ssl3_buffer.c:75:1: return from a call to ssl3_setup_read_buffer
  73.       SSLerr(SSL_F_SSL3_SETUP_READ_BUFFER, ERR_R_MALLOC_FAILURE);
  74.       return 0;
  75. > }
  76.   
  77.   int ssl3_setup_write_buffer(SSL *s, size_t numwpipes, size_t len)

ssl/record/ssl3_buffer.c:131:10: Taking false branch
129.   int ssl3_setup_buffers(SSL *s)
130.   {
131.       if (!ssl3_setup_read_buffer(s))
                ^
132.           return 0;
133.       if (!ssl3_setup_write_buffer(s, 1, 0))

ssl/record/ssl3_buffer.c:133:10: Skipping ssl3_setup_write_buffer(): empty list of specs
131.       if (!ssl3_setup_read_buffer(s))
132.           return 0;
133.       if (!ssl3_setup_write_buffer(s, 1, 0))
                ^
134.           return 0;
135.       return 1;
