crypto/err/err.c:729: error: MEMORY_LEAK
  memory dynamically allocated by call to `CRYPTO_malloc()` at line 714, column 11 is not reachable after line 729, column 21.
Showing all 37 steps of the trace


crypto/err/err.c:708:1: start of procedure ERR_add_error_vdata()
706.   }
707.   
708. > void ERR_add_error_vdata(int num, va_list args)
709.   {
710.       int i, n, s;

crypto/err/err.c:713:5: 
711.       char *str, *p, *a;
712.   
713. >     s = 80;
714.       str = OPENSSL_malloc(s + 1);
715.       if (str == NULL)

crypto/err/err.c:714:5: 
712.   
713.       s = 80;
714. >     str = OPENSSL_malloc(s + 1);
715.       if (str == NULL)
716.           return;

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)

crypto/err/err.c:715:9: Taking false branch
713.       s = 80;
714.       str = OPENSSL_malloc(s + 1);
715.       if (str == NULL)
               ^
716.           return;
717.       str[0] = '\0';

crypto/err/err.c:717:5: 
715.       if (str == NULL)
716.           return;
717. >     str[0] = '\0';
718.   
719.       n = 0;

crypto/err/err.c:719:5: 
717.       str[0] = '\0';
718.   
719. >     n = 0;
720.       for (i = 0; i < num; i++) {
721.           a = va_arg(args, char *);

crypto/err/err.c:720:10: 
718.   
719.       n = 0;
720. >     for (i = 0; i < num; i++) {
721.           a = va_arg(args, char *);
722.           /* ignore NULLs, thanks to Bob Beck <beck@obtuse.com> */

crypto/err/err.c:720:17: Loop condition is true. Entering loop body
718.   
719.       n = 0;
720.       for (i = 0; i < num; i++) {
                       ^
721.           a = va_arg(args, char *);
722.           /* ignore NULLs, thanks to Bob Beck <beck@obtuse.com> */

crypto/err/err.c:721:9: 
719.       n = 0;
720.       for (i = 0; i < num; i++) {
721. >         a = va_arg(args, char *);
722.           /* ignore NULLs, thanks to Bob Beck <beck@obtuse.com> */
723.           if (a != NULL) {

crypto/err/err.c:723:13: Taking true branch
721.           a = va_arg(args, char *);
722.           /* ignore NULLs, thanks to Bob Beck <beck@obtuse.com> */
723.           if (a != NULL) {
                   ^
724.               n += strlen(a);
725.               if (n > s) {

crypto/err/err.c:724:13: 
722.           /* ignore NULLs, thanks to Bob Beck <beck@obtuse.com> */
723.           if (a != NULL) {
724. >             n += strlen(a);
725.               if (n > s) {
726.                   s = n + 20;

crypto/err/err.c:725:17: Taking true branch
723.           if (a != NULL) {
724.               n += strlen(a);
725.               if (n > s) {
                       ^
726.                   s = n + 20;
727.                   p = OPENSSL_realloc(str, s + 1);

crypto/err/err.c:726:17: 
724.               n += strlen(a);
725.               if (n > s) {
726. >                 s = n + 20;
727.                   p = OPENSSL_realloc(str, s + 1);
728.                   if (p == NULL) {

crypto/err/err.c:727:17: 
725.               if (n > s) {
726.                   s = n + 20;
727. >                 p = OPENSSL_realloc(str, s + 1);
728.                   if (p == NULL) {
729.                       OPENSSL_free(str);

crypto/mem.c:195:1: start of procedure CRYPTO_realloc()
  193.   }
  194.   
  195. > void *CRYPTO_realloc(void *str, size_t num, const char *file, int line)
  196.   {
  197.       if (realloc_impl != NULL && realloc_impl != &CRYPTO_realloc)

crypto/mem.c:197:9: Taking true branch
  195.   void *CRYPTO_realloc(void *str, size_t num, const char *file, int line)
  196.   {
  197.       if (realloc_impl != NULL && realloc_impl != &CRYPTO_realloc)
                 ^
  198.           return realloc_impl(str, num, file, line);
  199.   

crypto/mem.c:197:33: Taking true branch
  195.   void *CRYPTO_realloc(void *str, size_t num, const char *file, int line)
  196.   {
  197.       if (realloc_impl != NULL && realloc_impl != &CRYPTO_realloc)
                                         ^
  198.           return realloc_impl(str, num, file, line);
  199.   

crypto/mem.c:198:9: Skipping __function_pointer__(): unresolved function pointer
  196.   {
  197.       if (realloc_impl != NULL && realloc_impl != &CRYPTO_realloc)
  198.           return realloc_impl(str, num, file, line);
                 ^
  199.   
  200.       FAILTEST();

crypto/mem.c:223:1: return from a call to CRYPTO_realloc
  221.       return realloc(str, num);
  222.   
  223. > }
  224.   
  225.   void *CRYPTO_clear_realloc(void *str, size_t old_len, size_t num,

crypto/err/err.c:728:21: Taking true branch
726.                   s = n + 20;
727.                   p = OPENSSL_realloc(str, s + 1);
728.                   if (p == NULL) {
                           ^
729.                       OPENSSL_free(str);
730.                       return;

crypto/err/err.c:729:21: 
727.                   p = OPENSSL_realloc(str, s + 1);
728.                   if (p == NULL) {
729. >                     OPENSSL_free(str);
730.                       return;
731.                   }

crypto/mem.c:252:1: start of procedure CRYPTO_free()
  250.   }
  251.   
  252. > void CRYPTO_free(void *str, const char *file, int line)
  253.   {
  254.       if (free_impl != NULL && free_impl != &CRYPTO_free) {

crypto/mem.c:254:9: Taking true branch
  252.   void CRYPTO_free(void *str, const char *file, int line)
  253.   {
  254.       if (free_impl != NULL && free_impl != &CRYPTO_free) {
                 ^
  255.           free_impl(str, file, line);
  256.           return;

crypto/mem.c:254:30: Taking true branch
  252.   void CRYPTO_free(void *str, const char *file, int line)
  253.   {
  254.       if (free_impl != NULL && free_impl != &CRYPTO_free) {
                                      ^
  255.           free_impl(str, file, line);
  256.           return;

crypto/mem.c:255:9: Skipping __function_pointer__(): unresolved function pointer
  253.   {
  254.       if (free_impl != NULL && free_impl != &CRYPTO_free) {
  255.           free_impl(str, file, line);
                 ^
  256.           return;
  257.       }

crypto/mem.c:256:9: 
  254.       if (free_impl != NULL && free_impl != &CRYPTO_free) {
  255.           free_impl(str, file, line);
  256. >         return;
  257.       }
  258.   

crypto/mem.c:270:1: return from a call to CRYPTO_free
  268.       free(str);
  269.   #endif
  270. > }
  271.   
  272.   void CRYPTO_clear_free(void *str, size_t num, const char *file, int line)
