engines/ccgost/gost_pmeth.c:440: error: MEMORY_LEAK
  memory dynamically allocated by call to `CRYPTO_malloc()` at line 436, column 15 is not reachable after line 440, column 5.
Showing all 28 steps of the trace


engines/ccgost/gost_pmeth.c:428:1: start of procedure pkey_gost_mac_keygen()
426.   }
427.   
428. > static int pkey_gost_mac_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey)
429.   {
430.       struct gost_mac_pmeth_data *data = EVP_PKEY_CTX_get_data(ctx);

engines/ccgost/gost_pmeth.c:430:5: 
428.   static int pkey_gost_mac_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey)
429.   {
430. >     struct gost_mac_pmeth_data *data = EVP_PKEY_CTX_get_data(ctx);
431.       unsigned char *keydata;
432.       if (!data->key_set) {

crypto/evp/pmeth_lib.c:406:1: start of procedure EVP_PKEY_CTX_get_data()
  404.   }
  405.   
  406. > void *EVP_PKEY_CTX_get_data(EVP_PKEY_CTX *ctx)
  407.   {
  408.       return ctx->data;

crypto/evp/pmeth_lib.c:408:5: 
  406.   void *EVP_PKEY_CTX_get_data(EVP_PKEY_CTX *ctx)
  407.   {
  408. >     return ctx->data;
  409.   }
  410.   

crypto/evp/pmeth_lib.c:409:1: return from a call to EVP_PKEY_CTX_get_data
  407.   {
  408.       return ctx->data;
  409. > }
  410.   
  411.   EVP_PKEY *EVP_PKEY_CTX_get0_pkey(EVP_PKEY_CTX *ctx)

engines/ccgost/gost_pmeth.c:432:10: Taking false branch
430.       struct gost_mac_pmeth_data *data = EVP_PKEY_CTX_get_data(ctx);
431.       unsigned char *keydata;
432.       if (!data->key_set) {
                ^
433.           GOSTerr(GOST_F_PKEY_GOST_MAC_KEYGEN, GOST_R_MAC_KEY_NOT_SET);
434.           return 0;

engines/ccgost/gost_pmeth.c:436:5: 
434.           return 0;
435.       }
436. >     keydata = OPENSSL_malloc(32);
437.       if (keydata == NULL)
438.           return 0;

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)

engines/ccgost/gost_pmeth.c:437:9: Taking false branch
435.       }
436.       keydata = OPENSSL_malloc(32);
437.       if (keydata == NULL)
               ^
438.           return 0;
439.       memcpy(keydata, data->key, 32);

engines/ccgost/gost_pmeth.c:439:5: 
437.       if (keydata == NULL)
438.           return 0;
439. >     memcpy(keydata, data->key, 32);
440.       EVP_PKEY_assign(pkey, NID_id_Gost28147_89_MAC, keydata);
441.       return 1;

engines/ccgost/gost_pmeth.c:440:5: 
438.           return 0;
439.       memcpy(keydata, data->key, 32);
440. >     EVP_PKEY_assign(pkey, NID_id_Gost28147_89_MAC, keydata);
441.       return 1;
442.   }

crypto/evp/p_lib.c:270:1: start of procedure EVP_PKEY_assign()
  268.   }
  269.   
  270. > int EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key)
  271.   {
  272.       if (pkey == NULL || !EVP_PKEY_set_type(pkey, type))

crypto/evp/p_lib.c:272:9: Taking false branch
  270.   int EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key)
  271.   {
  272.       if (pkey == NULL || !EVP_PKEY_set_type(pkey, type))
                 ^
  273.           return 0;
  274.       pkey->pkey.ptr = key;

crypto/evp/p_lib.c:272:26: 
  270.   int EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key)
  271.   {
  272. >     if (pkey == NULL || !EVP_PKEY_set_type(pkey, type))
  273.           return 0;
  274.       pkey->pkey.ptr = key;

crypto/evp/p_lib.c:260:1: start of procedure EVP_PKEY_set_type()
    258.   }
    259.   
    260. > int EVP_PKEY_set_type(EVP_PKEY *pkey, int type)
    261.   {
    262.       return pkey_set_type(pkey, type, NULL, -1);

crypto/evp/p_lib.c:262:5: Skipping pkey_set_type(): empty list of specs
    260.   int EVP_PKEY_set_type(EVP_PKEY *pkey, int type)
    261.   {
    262.       return pkey_set_type(pkey, type, NULL, -1);
               ^
    263.   }
    264.   

crypto/evp/p_lib.c:263:1: return from a call to EVP_PKEY_set_type
    261.   {
    262.       return pkey_set_type(pkey, type, NULL, -1);
    263. > }
    264.   
    265.   int EVP_PKEY_set_type_str(EVP_PKEY *pkey, const char *str, int len)

crypto/evp/p_lib.c:272:26: Taking true branch
  270.   int EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key)
  271.   {
  272.       if (pkey == NULL || !EVP_PKEY_set_type(pkey, type))
                                  ^
  273.           return 0;
  274.       pkey->pkey.ptr = key;

crypto/evp/p_lib.c:273:9: 
  271.   {
  272.       if (pkey == NULL || !EVP_PKEY_set_type(pkey, type))
  273. >         return 0;
  274.       pkey->pkey.ptr = key;
  275.       return (key != NULL);

crypto/evp/p_lib.c:276:1: return from a call to EVP_PKEY_assign
  274.       pkey->pkey.ptr = key;
  275.       return (key != NULL);
  276. > }
  277.   
  278.   void *EVP_PKEY_get0(EVP_PKEY *pkey)
