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


apps/engine.c:101:1: start of procedure append_buf()
99.   }
100.   
101. > static int append_buf(char **buf, int *size, const char *s)
102.   {
103.       if (*buf == NULL) {

apps/engine.c:103:9: Taking true branch
101.   static int append_buf(char **buf, int *size, const char *s)
102.   {
103.       if (*buf == NULL) {
               ^
104.           *size = 256;
105.           *buf = app_malloc(*size, "engine buffer");

apps/engine.c:104:9: 
102.   {
103.       if (*buf == NULL) {
104. >         *size = 256;
105.           *buf = app_malloc(*size, "engine buffer");
106.           **buf = '\0';

apps/engine.c:105:9: 
103.       if (*buf == NULL) {
104.           *size = 256;
105. >         *buf = app_malloc(*size, "engine buffer");
106.           **buf = '\0';
107.       }

apps/apps.c:991:1: start of procedure app_malloc()
  989.   }
  990.   
  991. > void* app_malloc(int sz, const char *what)
  992.   {
  993.       void *vp = OPENSSL_malloc(sz);

apps/apps.c:993:5: 
  991.   void* app_malloc(int sz, const char *what)
  992.   {
  993. >     void *vp = OPENSSL_malloc(sz);
  994.   
  995.       if (vp == NULL) {

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 (num <= 0)

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

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

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

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

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

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

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

apps/apps.c:995:9: Taking false branch
  993.       void *vp = OPENSSL_malloc(sz);
  994.   
  995.       if (vp == NULL) {
                 ^
  996.           BIO_printf(bio_err, "%s: Could not allocate %d bytes for %s\n",
  997.                   opt_getprog(), sz, what);

apps/apps.c:1001:5: 
  999.           exit(1);
  1000.       }
  1001. >     return vp;
  1002.   }
  1003.   

apps/apps.c:1002:1: return from a call to app_malloc
  1000.       }
  1001.       return vp;
  1002. > }
  1003.   
  1004.   /*

apps/engine.c:106:9: 
104.           *size = 256;
105.           *buf = app_malloc(*size, "engine buffer");
106. >         **buf = '\0';
107.       }
108.   

apps/engine.c:109:9: Taking true branch
107.       }
108.   
109.       if (strlen(*buf) + strlen(s) >= (unsigned int)*size) {
               ^
110.           *size += 256;
111.           *buf = OPENSSL_realloc(*buf, *size);

apps/engine.c:110:9: 
108.   
109.       if (strlen(*buf) + strlen(s) >= (unsigned int)*size) {
110. >         *size += 256;
111.           *buf = OPENSSL_realloc(*buf, *size);
112.       }

apps/engine.c:111:9: 
109.       if (strlen(*buf) + strlen(s) >= (unsigned int)*size) {
110.           *size += 256;
111. >         *buf = OPENSSL_realloc(*buf, *size);
112.       }
113.   

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

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

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

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

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

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

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

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