engines/e_ossltest.c:586: error: MEMORY_LEAK
  memory dynamically allocated by call to `EVP_CIPHER_CTX_new_cipher_data()` at line 579, column 9 is not reachable after line 586, column 12.
Showing all 39 steps of the trace


engines/e_ossltest.c:569:1: start of procedure ossltest_aes128_init_key()
567.    */
568.   
569. > int ossltest_aes128_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
570.                                const unsigned char *iv, int enc)
571.   {

engines/e_ossltest.c:572:9: 
570.                                const unsigned char *iv, int enc)
571.   {
572. >     if (EVP_CIPHER_CTX_cipher_data(ctx) == NULL) {
573.           /*
574.            * Normally cipher_data is allocated automatically for an engine but

crypto/evp/evp_lib.c:260:1: start of procedure EVP_CIPHER_CTX_cipher_data()
  258.   }
  259.   
  260. > void *EVP_CIPHER_CTX_cipher_data(const EVP_CIPHER_CTX *ctx)
  261.   {
  262.       return ctx->cipher_data;

crypto/evp/evp_lib.c:262:5: 
  260.   void *EVP_CIPHER_CTX_cipher_data(const EVP_CIPHER_CTX *ctx)
  261.   {
  262. >     return ctx->cipher_data;
  263.   }
  264.   

crypto/evp/evp_lib.c:263:1: return from a call to EVP_CIPHER_CTX_cipher_data
  261.   {
  262.       return ctx->cipher_data;
  263. > }
  264.   
  265.   /* FIXME: temporary until EVP_CIPHER goes opaque */

engines/e_ossltest.c:572:9: Taking true branch
570.                                const unsigned char *iv, int enc)
571.   {
572.       if (EVP_CIPHER_CTX_cipher_data(ctx) == NULL) {
               ^
573.           /*
574.            * Normally cipher_data is allocated automatically for an engine but

engines/e_ossltest.c:579:9: 
577.            */
578.           /* FIXME: when EVP_CIPHER goes opaque, we won't need this trickery any more */
579. >         EVP_CIPHER_CTX_new_cipher_data(ctx, EVP_aes_128_cbc()->ctx_size);
580.           if (EVP_CIPHER_CTX_cipher_data(ctx) == NULL) {
581.               OSSLTESTerr(OSSLTEST_F_OSSLTEST_AES128_INIT_KEY,

crypto/evp/e_aes.c:1233:1: start of procedure EVP_aes_128_cbc()
  1231.   }
  1232.   
  1233. > BLOCK_CIPHER_generic_pack(NID_aes, 128, 0)
  1234.       BLOCK_CIPHER_generic_pack(NID_aes, 192, 0)
  1235.       BLOCK_CIPHER_generic_pack(NID_aes, 256, 0)

crypto/evp/e_aes.c:1233:1: return from a call to EVP_aes_128_cbc
  1231.   }
  1232.   
  1233. > BLOCK_CIPHER_generic_pack(NID_aes, 128, 0)
  1234.       BLOCK_CIPHER_generic_pack(NID_aes, 192, 0)
  1235.       BLOCK_CIPHER_generic_pack(NID_aes, 256, 0)

crypto/evp/evp_lib.c:266:1: start of procedure EVP_CIPHER_CTX_new_cipher_data()
  264.   
  265.   /* FIXME: temporary until EVP_CIPHER goes opaque */
  266. > void EVP_CIPHER_CTX_new_cipher_data(EVP_CIPHER_CTX *ctx, size_t size)
  267.   {
  268.       if (ctx->cipher_data == NULL && ctx->cipher->ctx_size == 0)

crypto/evp/evp_lib.c:268:9: Taking true branch
  266.   void EVP_CIPHER_CTX_new_cipher_data(EVP_CIPHER_CTX *ctx, size_t size)
  267.   {
  268.       if (ctx->cipher_data == NULL && ctx->cipher->ctx_size == 0)
                 ^
  269.           ctx->cipher_data = OPENSSL_zalloc(size);
  270.   }

crypto/evp/evp_lib.c:268:37: Taking true branch
  266.   void EVP_CIPHER_CTX_new_cipher_data(EVP_CIPHER_CTX *ctx, size_t size)
  267.   {
  268.       if (ctx->cipher_data == NULL && ctx->cipher->ctx_size == 0)
                                             ^
  269.           ctx->cipher_data = OPENSSL_zalloc(size);
  270.   }

crypto/evp/evp_lib.c:269:9: 
  267.   {
  268.       if (ctx->cipher_data == NULL && ctx->cipher->ctx_size == 0)
  269. >         ctx->cipher_data = OPENSSL_zalloc(size);
  270.   }
  271.   

crypto/mem.c:157:1: start of procedure CRYPTO_zalloc()
    155.   }
    156.   
    157. > void *CRYPTO_zalloc(size_t num, const char *file, int line)
    158.   {
    159.       void *ret = CRYPTO_malloc(num, file, line);

crypto/mem.c:159:5: 
    157.   void *CRYPTO_zalloc(size_t num, const char *file, int line)
    158.   {
    159. >     void *ret = CRYPTO_malloc(num, file, line);
    160.   
    161.       if (ret != 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)

crypto/mem.c:161:9: Taking true branch
    159.       void *ret = CRYPTO_malloc(num, file, line);
    160.   
    161.       if (ret != NULL)
                   ^
    162.           memset(ret, 0, num);
    163.       return ret;

crypto/mem.c:162:9: 
    160.   
    161.       if (ret != NULL)
    162. >         memset(ret, 0, num);
    163.       return ret;
    164.   }

crypto/mem.c:163:5: 
    161.       if (ret != NULL)
    162.           memset(ret, 0, num);
    163. >     return ret;
    164.   }
    165.   

crypto/mem.c:164:1: return from a call to CRYPTO_zalloc
    162.           memset(ret, 0, num);
    163.       return ret;
    164. > }
    165.   
    166.   void *CRYPTO_realloc(void *str, size_t num, const char *file, int line)

crypto/evp/evp_lib.c:268:5: 
  266.   void EVP_CIPHER_CTX_new_cipher_data(EVP_CIPHER_CTX *ctx, size_t size)
  267.   {
  268. >     if (ctx->cipher_data == NULL && ctx->cipher->ctx_size == 0)
  269.           ctx->cipher_data = OPENSSL_zalloc(size);
  270.   }

crypto/evp/evp_lib.c:270:1: return from a call to EVP_CIPHER_CTX_new_cipher_data
  268.       if (ctx->cipher_data == NULL && ctx->cipher->ctx_size == 0)
  269.           ctx->cipher_data = OPENSSL_zalloc(size);
  270. > }
  271.   
  272.   int EVP_CIPHER_iv_length(const EVP_CIPHER *cipher)

engines/e_ossltest.c:580:13: 
578.           /* FIXME: when EVP_CIPHER goes opaque, we won't need this trickery any more */
579.           EVP_CIPHER_CTX_new_cipher_data(ctx, EVP_aes_128_cbc()->ctx_size);
580. >         if (EVP_CIPHER_CTX_cipher_data(ctx) == NULL) {
581.               OSSLTESTerr(OSSLTEST_F_OSSLTEST_AES128_INIT_KEY,
582.                           ERR_R_MALLOC_FAILURE);

crypto/evp/evp_lib.c:260:1: start of procedure EVP_CIPHER_CTX_cipher_data()
  258.   }
  259.   
  260. > void *EVP_CIPHER_CTX_cipher_data(const EVP_CIPHER_CTX *ctx)
  261.   {
  262.       return ctx->cipher_data;

crypto/evp/evp_lib.c:262:5: 
  260.   void *EVP_CIPHER_CTX_cipher_data(const EVP_CIPHER_CTX *ctx)
  261.   {
  262. >     return ctx->cipher_data;
  263.   }
  264.   

crypto/evp/evp_lib.c:263:1: return from a call to EVP_CIPHER_CTX_cipher_data
  261.   {
  262.       return ctx->cipher_data;
  263. > }
  264.   
  265.   /* FIXME: temporary until EVP_CIPHER goes opaque */

engines/e_ossltest.c:580:13: Taking false branch
578.           /* FIXME: when EVP_CIPHER goes opaque, we won't need this trickery any more */
579.           EVP_CIPHER_CTX_new_cipher_data(ctx, EVP_aes_128_cbc()->ctx_size);
580.           if (EVP_CIPHER_CTX_cipher_data(ctx) == NULL) {
                   ^
581.               OSSLTESTerr(OSSLTEST_F_OSSLTEST_AES128_INIT_KEY,
582.                           ERR_R_MALLOC_FAILURE);

engines/e_ossltest.c:586:5: 
584.           }
585.       }
586. >     return EVP_aes_128_cbc()->init(ctx, key, iv, enc);
587.   }
588.   

crypto/evp/e_aes.c:1233:1: start of procedure EVP_aes_128_cbc()
  1231.   }
  1232.   
  1233. > BLOCK_CIPHER_generic_pack(NID_aes, 128, 0)
  1234.       BLOCK_CIPHER_generic_pack(NID_aes, 192, 0)
  1235.       BLOCK_CIPHER_generic_pack(NID_aes, 256, 0)

crypto/evp/e_aes.c:1233:1: return from a call to EVP_aes_128_cbc
  1231.   }
  1232.   
  1233. > BLOCK_CIPHER_generic_pack(NID_aes, 128, 0)
  1234.       BLOCK_CIPHER_generic_pack(NID_aes, 192, 0)
  1235.       BLOCK_CIPHER_generic_pack(NID_aes, 256, 0)

engines/e_ossltest.c:586:5: Skipping __function_pointer__(): unresolved function pointer
584.           }
585.       }
586.       return EVP_aes_128_cbc()->init(ctx, key, iv, enc);
           ^
587.   }
588.   
