crypto/context.c:51: error: MEMORY_LEAK
  memory dynamically allocated by call to `CRYPTO_zalloc()` at line 48, column 24 is not reachable after line 51, column 9.
Showing all 21 steps of the trace


crypto/context.c:46:1: start of procedure OPENSSL_CTX_new()
44.   }
45.   
46. > OPENSSL_CTX *OPENSSL_CTX_new(void)
47.   {
48.       OPENSSL_CTX *ctx = OPENSSL_zalloc(sizeof(*ctx));

crypto/context.c:48:5: 
46.   OPENSSL_CTX *OPENSSL_CTX_new(void)
47.   {
48. >     OPENSSL_CTX *ctx = OPENSSL_zalloc(sizeof(*ctx));
49.   
50.       if (ctx != NULL && !context_init(ctx)) {

crypto/mem.c:228:1: start of procedure CRYPTO_zalloc()
  226.   }
  227.   
  228. > void *CRYPTO_zalloc(size_t num, const char *file, int line)
  229.   {
  230.       void *ret = CRYPTO_malloc(num, file, line);

crypto/mem.c:230:5: 
  228.   void *CRYPTO_zalloc(size_t num, const char *file, int line)
  229.   {
  230. >     void *ret = CRYPTO_malloc(num, file, line);
  231.   
  232.       FAILTEST();

crypto/mem.c:192:1: start of procedure CRYPTO_malloc()
    190.   #endif
    191.   
    192. > void *CRYPTO_malloc(size_t num, const char *file, int line)
    193.   {
    194.       void *ret = NULL;

crypto/mem.c:194:5: 
    192.   void *CRYPTO_malloc(size_t num, const char *file, int line)
    193.   {
    194. >     void *ret = NULL;
    195.   
    196.       INCREMENT(malloc_count);

crypto/mem.c:197:9: Taking false branch
    195.   
    196.       INCREMENT(malloc_count);
    197.       if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)
                   ^
    198.           return malloc_impl(num, file, line);
    199.   

crypto/mem.c:200:9: Taking false branch
    198.           return malloc_impl(num, file, line);
    199.   
    200.       if (num == 0)
                   ^
    201.           return NULL;
    202.   

crypto/mem.c:204:9: Taking false branch
    202.   
    203.       FAILTEST();
    204.       if (allow_customize) {
                   ^
    205.           /*
    206.            * Disallow customization after the first allocation. We only set this

crypto/mem.c:221:5: 
    219.       }
    220.   #else
    221. >     (void)(file); (void)(line);
    222.       ret = malloc(num);
    223.   #endif

crypto/mem.c:221:19: 
    219.       }
    220.   #else
    221. >     (void)(file); (void)(line);
    222.       ret = malloc(num);
    223.   #endif

crypto/mem.c:222:5: 
    220.   #else
    221.       (void)(file); (void)(line);
    222. >     ret = malloc(num);
    223.   #endif
    224.   

crypto/mem.c:225:5: 
    223.   #endif
    224.   
    225. >     return ret;
    226.   }
    227.   

crypto/mem.c:226:1: return from a call to CRYPTO_malloc
    224.   
    225.       return ret;
    226. > }
    227.   
    228.   void *CRYPTO_zalloc(size_t num, const char *file, int line)

crypto/mem.c:233:9: Taking true branch
  231.   
  232.       FAILTEST();
  233.       if (ret != NULL)
                 ^
  234.           memset(ret, 0, num);
  235.       return ret;

crypto/mem.c:234:9: 
  232.       FAILTEST();
  233.       if (ret != NULL)
  234. >         memset(ret, 0, num);
  235.       return ret;
  236.   }

crypto/mem.c:235:5: 
  233.       if (ret != NULL)
  234.           memset(ret, 0, num);
  235. >     return ret;
  236.   }
  237.   

crypto/mem.c:236:1: return from a call to CRYPTO_zalloc
  234.           memset(ret, 0, num);
  235.       return ret;
  236. > }
  237.   
  238.   void *CRYPTO_realloc(void *str, size_t num, const char *file, int line)

crypto/context.c:50:9: Taking true branch
48.       OPENSSL_CTX *ctx = OPENSSL_zalloc(sizeof(*ctx));
49.   
50.       if (ctx != NULL && !context_init(ctx)) {
              ^
51.           OPENSSL_CTX_free(ctx);
52.           ctx = NULL;

crypto/context.c:50:25: Taking true branch
48.       OPENSSL_CTX *ctx = OPENSSL_zalloc(sizeof(*ctx));
49.   
50.       if (ctx != NULL && !context_init(ctx)) {
                              ^
51.           OPENSSL_CTX_free(ctx);
52.           ctx = NULL;

crypto/context.c:51:9: Skipping OPENSSL_CTX_free(): empty list of specs
49.   
50.       if (ctx != NULL && !context_init(ctx)) {
51.           OPENSSL_CTX_free(ctx);
              ^
52.           ctx = NULL;
53.       }
