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


crypto/err/err.c:937:1: start of procedure ERR_add_error_vdata()
935.   }
936.   
937. > void ERR_add_error_vdata(int num, va_list args)
938.   {
939.       int i, n, s;

crypto/err/err.c:942:5: 
940.       char *str, *p, *a;
941.   
942. >     s = 80;
943.       str = OPENSSL_malloc(s + 1);
944.       if (str == NULL)

crypto/err/err.c:943:5: 
941.   
942.       s = 80;
943. >     str = OPENSSL_malloc(s + 1);
944.       if (str == NULL)
945.           return;

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)

crypto/err/err.c:944:9: Taking false branch
942.       s = 80;
943.       str = OPENSSL_malloc(s + 1);
944.       if (str == NULL)
               ^
945.           return;
946.       str[0] = '\0';

crypto/err/err.c:946:5: 
944.       if (str == NULL)
945.           return;
946. >     str[0] = '\0';
947.   
948.       n = 0;

crypto/err/err.c:948:5: 
946.       str[0] = '\0';
947.   
948. >     n = 0;
949.       for (i = 0; i < num; i++) {
950.           a = va_arg(args, char *);

crypto/err/err.c:949:10: 
947.   
948.       n = 0;
949. >     for (i = 0; i < num; i++) {
950.           a = va_arg(args, char *);
951.           /* ignore NULLs, thanks to Bob Beck <beck@obtuse.com> */

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

crypto/err/err.c:950:9: 
948.       n = 0;
949.       for (i = 0; i < num; i++) {
950. >         a = va_arg(args, char *);
951.           /* ignore NULLs, thanks to Bob Beck <beck@obtuse.com> */
952.           if (a != NULL) {

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

crypto/err/err.c:953:13: 
951.           /* ignore NULLs, thanks to Bob Beck <beck@obtuse.com> */
952.           if (a != NULL) {
953. >             n += strlen(a);
954.               if (n > s) {
955.                   s = n + 20;

crypto/err/err.c:954:17: Taking true branch
952.           if (a != NULL) {
953.               n += strlen(a);
954.               if (n > s) {
                       ^
955.                   s = n + 20;
956.                   p = OPENSSL_realloc(str, s + 1);

crypto/err/err.c:955:17: 
953.               n += strlen(a);
954.               if (n > s) {
955. >                 s = n + 20;
956.                   p = OPENSSL_realloc(str, s + 1);
957.                   if (p == NULL) {

crypto/err/err.c:956:17: 
954.               if (n > s) {
955.                   s = n + 20;
956. >                 p = OPENSSL_realloc(str, s + 1);
957.                   if (p == NULL) {
958.                       OPENSSL_free(str);

crypto/mem.c:167:1: start of procedure CRYPTO_realloc()
  165.   }
  166.   
  167. > void *CRYPTO_realloc(void *str, size_t num, const char *file, int line)
  168.   {
  169.       if (realloc_impl != NULL && realloc_impl != &CRYPTO_realloc)

crypto/mem.c:169:9: Taking true branch
  167.   void *CRYPTO_realloc(void *str, size_t num, const char *file, int line)
  168.   {
  169.       if (realloc_impl != NULL && realloc_impl != &CRYPTO_realloc)
                 ^
  170.           return realloc_impl(str, num, file, line);
  171.   

crypto/mem.c:169:33: Taking true branch
  167.   void *CRYPTO_realloc(void *str, size_t num, const char *file, int line)
  168.   {
  169.       if (realloc_impl != NULL && realloc_impl != &CRYPTO_realloc)
                                         ^
  170.           return realloc_impl(str, num, file, line);
  171.   

crypto/mem.c:170:9: Skipping __function_pointer__(): unresolved function pointer
  168.   {
  169.       if (realloc_impl != NULL && realloc_impl != &CRYPTO_realloc)
  170.           return realloc_impl(str, num, file, line);
                 ^
  171.   
  172.       if (str == NULL)

crypto/mem.c:194:1: return from a call to CRYPTO_realloc
  192.       return realloc(str, num);
  193.   
  194. > }
  195.   
  196.   void *CRYPTO_clear_realloc(void *str, size_t old_len, size_t num,

crypto/err/err.c:957:21: Taking true branch
955.                   s = n + 20;
956.                   p = OPENSSL_realloc(str, s + 1);
957.                   if (p == NULL) {
                           ^
958.                       OPENSSL_free(str);
959.                       return;

crypto/err/err.c:958:21: 
956.                   p = OPENSSL_realloc(str, s + 1);
957.                   if (p == NULL) {
958. >                     OPENSSL_free(str);
959.                       return;
960.                   }

crypto/mem.c:222:1: start of procedure CRYPTO_free()
  220.   }
  221.   
  222. > void CRYPTO_free(void *str, const char *file, int line)
  223.   {
  224.       if (free_impl != NULL && free_impl != &CRYPTO_free) {

crypto/mem.c:224:9: Taking true branch
  222.   void CRYPTO_free(void *str, const char *file, int line)
  223.   {
  224.       if (free_impl != NULL && free_impl != &CRYPTO_free) {
                 ^
  225.           free_impl(str, file, line);
  226.           return;

crypto/mem.c:224:30: Taking true branch
  222.   void CRYPTO_free(void *str, const char *file, int line)
  223.   {
  224.       if (free_impl != NULL && free_impl != &CRYPTO_free) {
                                      ^
  225.           free_impl(str, file, line);
  226.           return;

crypto/mem.c:225:9: Skipping __function_pointer__(): unresolved function pointer
  223.   {
  224.       if (free_impl != NULL && free_impl != &CRYPTO_free) {
  225.           free_impl(str, file, line);
                 ^
  226.           return;
  227.       }

crypto/mem.c:226:9: 
  224.       if (free_impl != NULL && free_impl != &CRYPTO_free) {
  225.           free_impl(str, file, line);
  226. >         return;
  227.       }
  228.   

crypto/mem.c:240:1: return from a call to CRYPTO_free
  238.       free(str);
  239.   #endif
  240. > }
  241.   
  242.   void CRYPTO_clear_free(void *str, size_t num, const char *file, int line)
