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


crypto/err/err.c:704:1: start of procedure ERR_add_error_vdata()
702.   }
703.   
704. > void ERR_add_error_vdata(int num, va_list args)
705.   {
706.       int i, n, s;

crypto/err/err.c:709:5: 
707.       char *str, *p, *a;
708.   
709. >     s = 80;
710.       str = OPENSSL_malloc(s + 1);
711.       if (str == NULL)

crypto/err/err.c:710:5: 
708.   
709.       s = 80;
710. >     str = OPENSSL_malloc(s + 1);
711.       if (str == NULL)
712.           return;

crypto/mem.c:71:1: start of procedure CRYPTO_malloc()
  69.   }
  70.   
  71. > void *CRYPTO_malloc(size_t num, const char *file, int line)
  72.   {
  73.       void *ret = NULL;

crypto/mem.c:73:5: 
  71.   void *CRYPTO_malloc(size_t num, const char *file, int line)
  72.   {
  73. >     void *ret = NULL;
  74.   
  75.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)

crypto/mem.c:75:9: Taking false branch
  73.       void *ret = NULL;
  74.   
  75.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)
                ^
  76.           return malloc_impl(num, file, line);
  77.   

crypto/mem.c:78:9: Taking false branch
  76.           return malloc_impl(num, file, line);
  77.   
  78.       if (num <= 0)
                ^
  79.           return NULL;
  80.   

crypto/mem.c:81:5: 
  79.           return NULL;
  80.   
  81. >     allow_customize = 0;
  82.   #ifndef OPENSSL_NO_CRYPTO_MDEBUG
  83.       if (call_malloc_debug) {

crypto/mem.c:91:5: 
  89.       }
  90.   #else
  91. >     osslargused(file); osslargused(line);
  92.       ret = malloc(num);
  93.   #endif

crypto/mem.c:91:24: 
  89.       }
  90.   #else
  91. >     osslargused(file); osslargused(line);
  92.       ret = malloc(num);
  93.   #endif

crypto/mem.c:92:5: 
  90.   #else
  91.       osslargused(file); osslargused(line);
  92. >     ret = malloc(num);
  93.   #endif
  94.   

crypto/mem.c:95:5: 
  93.   #endif
  94.   
  95. >     return ret;
  96.   }
  97.   

crypto/mem.c:96:1: return from a call to CRYPTO_malloc
  94.   
  95.       return ret;
  96. > }
  97.   
  98.   void *CRYPTO_zalloc(size_t num, const char *file, int line)

crypto/err/err.c:711:9: Taking false branch
709.       s = 80;
710.       str = OPENSSL_malloc(s + 1);
711.       if (str == NULL)
               ^
712.           return;
713.       str[0] = '\0';

crypto/err/err.c:713:5: 
711.       if (str == NULL)
712.           return;
713. >     str[0] = '\0';
714.   
715.       n = 0;

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

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

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

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

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

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

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

crypto/err/err.c:722:17: 
720.               n += strlen(a);
721.               if (n > s) {
722. >                 s = n + 20;
723.                   p = OPENSSL_realloc(str, s + 1);
724.                   if (p == NULL) {

crypto/err/err.c:723:17: 
721.               if (n > s) {
722.                   s = n + 20;
723. >                 p = OPENSSL_realloc(str, s + 1);
724.                   if (p == NULL) {
725.                       OPENSSL_free(str);

crypto/mem.c:107:1: start of procedure CRYPTO_realloc()
  105.   }
  106.   
  107. > void *CRYPTO_realloc(void *str, size_t num, const char *file, int line)
  108.   {
  109.       if (realloc_impl != NULL && realloc_impl != &CRYPTO_realloc)

crypto/mem.c:109:9: Taking true branch
  107.   void *CRYPTO_realloc(void *str, size_t num, const char *file, int line)
  108.   {
  109.       if (realloc_impl != NULL && realloc_impl != &CRYPTO_realloc)
                 ^
  110.           return realloc_impl(str, num, file, line);
  111.   

crypto/mem.c:109:33: Taking true branch
  107.   void *CRYPTO_realloc(void *str, size_t num, const char *file, int line)
  108.   {
  109.       if (realloc_impl != NULL && realloc_impl != &CRYPTO_realloc)
                                         ^
  110.           return realloc_impl(str, num, file, line);
  111.   

crypto/mem.c:110:9: Skipping __function_pointer__(): unresolved function pointer
  108.   {
  109.       if (realloc_impl != NULL && realloc_impl != &CRYPTO_realloc)
  110.           return realloc_impl(str, num, file, line);
                 ^
  111.   
  112.       if (str == NULL)

crypto/mem.c:134:1: return from a call to CRYPTO_realloc
  132.       return realloc(str, num);
  133.   
  134. > }
  135.   
  136.   void *CRYPTO_clear_realloc(void *str, size_t old_len, size_t num,

crypto/err/err.c:724:21: Taking true branch
722.                   s = n + 20;
723.                   p = OPENSSL_realloc(str, s + 1);
724.                   if (p == NULL) {
                           ^
725.                       OPENSSL_free(str);
726.                       return;

crypto/err/err.c:725:21: 
723.                   p = OPENSSL_realloc(str, s + 1);
724.                   if (p == NULL) {
725. >                     OPENSSL_free(str);
726.                       return;
727.                   }

crypto/mem.c:163:1: start of procedure CRYPTO_free()
  161.   }
  162.   
  163. > void CRYPTO_free(void *str, const char *file, int line)
  164.   {
  165.       if (free_impl != NULL && free_impl != &CRYPTO_free) {

crypto/mem.c:165:9: Taking true branch
  163.   void CRYPTO_free(void *str, const char *file, int line)
  164.   {
  165.       if (free_impl != NULL && free_impl != &CRYPTO_free) {
                 ^
  166.           free_impl(str, file, line);
  167.           return;

crypto/mem.c:165:30: Taking true branch
  163.   void CRYPTO_free(void *str, const char *file, int line)
  164.   {
  165.       if (free_impl != NULL && free_impl != &CRYPTO_free) {
                                      ^
  166.           free_impl(str, file, line);
  167.           return;

crypto/mem.c:166:9: Skipping __function_pointer__(): unresolved function pointer
  164.   {
  165.       if (free_impl != NULL && free_impl != &CRYPTO_free) {
  166.           free_impl(str, file, line);
                 ^
  167.           return;
  168.       }

crypto/mem.c:167:9: 
  165.       if (free_impl != NULL && free_impl != &CRYPTO_free) {
  166.           free_impl(str, file, line);
  167. >         return;
  168.       }
  169.   

crypto/mem.c:181:1: return from a call to CRYPTO_free
  179.       free(str);
  180.   #endif
  181. > }
  182.   
  183.   void CRYPTO_clear_free(void *str, size_t num, const char *file, int line)
