apps/engine.c:105: error: MEMORY_LEAK
  memory dynamically allocated by call to `app_malloc()` at line 99, column 16 is not reachable after line 105, column 9.
Showing all 30 steps of the trace


apps/engine.c:95:1: start of procedure append_buf()
93.   }
94.   
95. > static int append_buf(char **buf, const char *s, int *size, int step)
96.   {
97.       if (*buf == NULL) {

apps/engine.c:97:9: Taking true branch
95.   static int append_buf(char **buf, const char *s, int *size, int step)
96.   {
97.       if (*buf == NULL) {
               ^
98.           *size = step;
99.           *buf = app_malloc(*size, "engine buffer");

apps/engine.c:98:9: 
96.   {
97.       if (*buf == NULL) {
98. >         *size = step;
99.           *buf = app_malloc(*size, "engine buffer");
100.           **buf = '\0';

apps/engine.c:99:9: 
97.       if (*buf == NULL) {
98.           *size = step;
99. >         *buf = app_malloc(*size, "engine buffer");
100.           **buf = '\0';
101.       }

apps/apps.c:976:1: start of procedure app_malloc()
  974.   }
  975.   
  976. > void* app_malloc(int sz, const char *what)
  977.   {
  978.       void *vp = OPENSSL_malloc(sz);

apps/apps.c:978:5: 
  976.   void* app_malloc(int sz, const char *what)
  977.   {
  978. >     void *vp = OPENSSL_malloc(sz);
  979.   
  980.       if (vp == NULL) {

crypto/mem.c:120:1: start of procedure CRYPTO_malloc()
    118.   }
    119.   
    120. > void *CRYPTO_malloc(size_t num, const char *file, int line)
    121.   {
    122.       void *ret = NULL;

crypto/mem.c:122:5: 
    120.   void *CRYPTO_malloc(size_t num, const char *file, int line)
    121.   {
    122. >     void *ret = NULL;
    123.   
    124.       if (num <= 0)

crypto/mem.c:124:9: Taking false branch
    122.       void *ret = NULL;
    123.   
    124.       if (num <= 0)
                   ^
    125.           return NULL;
    126.   

crypto/mem.c:127:5: 
    125.           return NULL;
    126.   
    127. >     allow_customize = 0;
    128.   #ifndef OPENSSL_NO_CRYPTO_MDEBUG
    129.       if (call_malloc_debug) {

crypto/mem.c:137:5: 
    135.       }
    136.   #else
    137. >     (void)file;
    138.       (void)line;
    139.       ret = malloc(num);

crypto/mem.c:138:5: 
    136.   #else
    137.       (void)file;
    138. >     (void)line;
    139.       ret = malloc(num);
    140.   #endif

crypto/mem.c:139:5: 
    137.       (void)file;
    138.       (void)line;
    139. >     ret = malloc(num);
    140.   #endif
    141.   

crypto/mem.c:154:5: 
    152.   #endif
    153.   
    154. >     return ret;
    155.   }
    156.   

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

apps/apps.c:980:9: Taking false branch
  978.       void *vp = OPENSSL_malloc(sz);
  979.   
  980.       if (vp == NULL) {
                 ^
  981.           BIO_printf(bio_err, "%s: Could not allocate %d bytes for %s\n",
  982.                   opt_getprog(), sz, what);

apps/apps.c:986:5: 
  984.           exit(1);
  985.       }
  986. >     return vp;
  987.   }
  988.   

apps/apps.c:987:1: return from a call to app_malloc
  985.       }
  986.       return vp;
  987. > }
  988.   
  989.   /*

apps/engine.c:100:9: 
98.           *size = step;
99.           *buf = app_malloc(*size, "engine buffer");
100. >         **buf = '\0';
101.       }
102.   

apps/engine.c:103:9: Taking true branch
101.       }
102.   
103.       if (strlen(*buf) + strlen(s) >= (unsigned int)*size) {
               ^
104.           *size += step;
105.           *buf = OPENSSL_realloc(*buf, *size);

apps/engine.c:104:9: 
102.   
103.       if (strlen(*buf) + strlen(s) >= (unsigned int)*size) {
104. >         *size += step;
105.           *buf = OPENSSL_realloc(*buf, *size);
106.       }

apps/engine.c:105:9: 
103.       if (strlen(*buf) + strlen(s) >= (unsigned int)*size) {
104.           *size += step;
105. >         *buf = OPENSSL_realloc(*buf, *size);
106.       }
107.   

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

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

crypto/mem.c:171:9: Taking false branch
  169.           return CRYPTO_malloc(num, file, line);
  170.   
  171.       if (num == 0) {
                 ^
  172.           CRYPTO_free(str);
  173.           return NULL;

crypto/mem.c:176:5: 
  174.       }
  175.   
  176. >     allow_customize = 0;
  177.   #ifndef OPENSSL_NO_CRYPTO_MDEBUG
  178.       if (call_malloc_debug) {

crypto/mem.c:186:5: 
  184.       }
  185.   #else
  186. >     (void)file;
  187.       (void)line;
  188.   #endif

crypto/mem.c:187:5: 
  185.   #else
  186.       (void)file;
  187. >     (void)line;
  188.   #endif
  189.       return realloc(str, num);

crypto/mem.c:189:5: 
  187.       (void)line;
  188.   #endif
  189. >     return realloc(str, num);
  190.   
  191.   }

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