crypto/dh/dh_pmeth.c:367: error: MEMORY_LEAK
  memory dynamically allocated by call to `DH_get_1024_160()` at line 353, column 18 is not reachable after line 367, column 9.
Showing all 124 steps of the trace


crypto/dh/dh_pmeth.c:344:1: start of procedure pkey_dh_paramgen()
342.   #endif
343.   
344. > static int pkey_dh_paramgen(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey)
345.   {
346.       DH *dh = NULL;

crypto/dh/dh_pmeth.c:346:5: 
344.   static int pkey_dh_paramgen(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey)
345.   {
346. >     DH *dh = NULL;
347.       DH_PKEY_CTX *dctx = ctx->data;
348.       BN_GENCB *pcb;

crypto/dh/dh_pmeth.c:347:5: 
345.   {
346.       DH *dh = NULL;
347. >     DH_PKEY_CTX *dctx = ctx->data;
348.       BN_GENCB *pcb;
349.       int ret;

crypto/dh/dh_pmeth.c:350:9: Taking true branch
348.       BN_GENCB *pcb;
349.       int ret;
350.       if (dctx->rfc5114_param) {
               ^
351.           switch (dctx->rfc5114_param) {
352.           case 1:

crypto/dh/dh_pmeth.c:351:9: 
349.       int ret;
350.       if (dctx->rfc5114_param) {
351. >         switch (dctx->rfc5114_param) {
352.           case 1:
353.               dh = DH_get_1024_160();

crypto/dh/dh_pmeth.c:352:9: Switch condition is true. Entering switch case
350.       if (dctx->rfc5114_param) {
351.           switch (dctx->rfc5114_param) {
352.           case 1:
               ^
353.               dh = DH_get_1024_160();
354.               break;

crypto/dh/dh_pmeth.c:353:13: 
351.           switch (dctx->rfc5114_param) {
352.           case 1:
353. >             dh = DH_get_1024_160();
354.               break;
355.   

crypto/dh/dh_rfc5114.c:88:1: start of procedure DH_get_1024_160()
  86.   }
  87.   
  88. > make_dh(1024_160)
  89.   make_dh(2048_224)
  90.   make_dh(2048_256)

crypto/dh/dh_rfc5114.c:88:1: Taking false branch
  86.   }
  87.   
  88. > make_dh(1024_160)
  89.   make_dh(2048_224)
  90.   make_dh(2048_256)

crypto/bn/bn_lib.c:410:1: start of procedure BN_dup()
    408.   }
    409.   
    410. > BIGNUM *BN_dup(const BIGNUM *a)
    411.   {
    412.       BIGNUM *t;

crypto/bn/bn_lib.c:414:9: Taking false branch
    412.       BIGNUM *t;
    413.   
    414.       if (a == NULL)
                   ^
    415.           return NULL;
    416.       bn_check_top(a);

crypto/bn/bn_lib.c:418:9: 
    416.       bn_check_top(a);
    417.   
    418. >     t = BN_get_flags(a, BN_FLG_SECURE) ? BN_secure_new() : BN_new();
    419.       if (t == NULL)
    420.           return NULL;

crypto/bn/bn_lib.c:965:1: start of procedure BN_get_flags()
      963.   }
      964.   
      965. > int BN_get_flags(const BIGNUM *b, int n)
      966.   {
      967.       return b->flags & n;

crypto/bn/bn_lib.c:967:5: 
      965.   int BN_get_flags(const BIGNUM *b, int n)
      966.   {
      967. >     return b->flags & n;
      968.   }
      969.   

crypto/bn/bn_lib.c:968:1: return from a call to BN_get_flags
      966.   {
      967.       return b->flags & n;
      968. > }
      969.   
      970.   /* Populate a BN_GENCB structure with an "old"-style callback */

crypto/bn/bn_lib.c:418:9: Condition is false
    416.       bn_check_top(a);
    417.   
    418.       t = BN_get_flags(a, BN_FLG_SECURE) ? BN_secure_new() : BN_new();
                   ^
    419.       if (t == NULL)
    420.           return NULL;

crypto/bn/bn_lib.c:277:1: start of procedure BN_new()
      275.   }
      276.   
      277. > BIGNUM *BN_new(void)
      278.   {
      279.       BIGNUM *ret;

crypto/bn/bn_lib.c:281:9: 
      279.       BIGNUM *ret;
      280.   
      281. >     if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL) {
      282.           BNerr(BN_F_BN_NEW, ERR_R_MALLOC_FAILURE);
      283.           return (NULL);

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/bn/bn_lib.c:281:9: Taking false branch
      279.       BIGNUM *ret;
      280.   
      281.       if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL) {
                     ^
      282.           BNerr(BN_F_BN_NEW, ERR_R_MALLOC_FAILURE);
      283.           return (NULL);

crypto/bn/bn_lib.c:285:5: 
      283.           return (NULL);
      284.       }
      285. >     ret->flags = BN_FLG_MALLOCED;
      286.       bn_check_top(ret);
      287.       return (ret);

crypto/bn/bn_lib.c:287:5: 
      285.       ret->flags = BN_FLG_MALLOCED;
      286.       bn_check_top(ret);
      287. >     return (ret);
      288.   }
      289.   

crypto/bn/bn_lib.c:288:1: return from a call to BN_new
      286.       bn_check_top(ret);
      287.       return (ret);
      288. > }
      289.   
      290.    BIGNUM *BN_secure_new(void)

crypto/bn/bn_lib.c:418:5: 
    416.       bn_check_top(a);
    417.   
    418. >     t = BN_get_flags(a, BN_FLG_SECURE) ? BN_secure_new() : BN_new();
    419.       if (t == NULL)
    420.           return NULL;

crypto/bn/bn_lib.c:419:9: Taking false branch
    417.   
    418.       t = BN_get_flags(a, BN_FLG_SECURE) ? BN_secure_new() : BN_new();
    419.       if (t == NULL)
                   ^
    420.           return NULL;
    421.       if (!BN_copy(t, a)) {

crypto/bn/bn_lib.c:421:10: Taking false branch
    419.       if (t == NULL)
    420.           return NULL;
    421.       if (!BN_copy(t, a)) {
                    ^
    422.           BN_free(t);
    423.           return NULL;

crypto/bn/bn_lib.c:426:5: 
    424.       }
    425.       bn_check_top(t);
    426. >     return t;
    427.   }
    428.   

crypto/bn/bn_lib.c:427:1: return from a call to BN_dup
    425.       bn_check_top(t);
    426.       return t;
    427. > }
    428.   
    429.   BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)

crypto/dh/dh_rfc5114.c:88:1: 
  86.   }
  87.   
  88. > make_dh(1024_160)
  89.   make_dh(2048_224)
  90.   make_dh(2048_256)

crypto/bn/bn_lib.c:410:1: start of procedure BN_dup()
    408.   }
    409.   
    410. > BIGNUM *BN_dup(const BIGNUM *a)
    411.   {
    412.       BIGNUM *t;

crypto/bn/bn_lib.c:414:9: Taking false branch
    412.       BIGNUM *t;
    413.   
    414.       if (a == NULL)
                   ^
    415.           return NULL;
    416.       bn_check_top(a);

crypto/bn/bn_lib.c:418:9: 
    416.       bn_check_top(a);
    417.   
    418. >     t = BN_get_flags(a, BN_FLG_SECURE) ? BN_secure_new() : BN_new();
    419.       if (t == NULL)
    420.           return NULL;

crypto/bn/bn_lib.c:965:1: start of procedure BN_get_flags()
      963.   }
      964.   
      965. > int BN_get_flags(const BIGNUM *b, int n)
      966.   {
      967.       return b->flags & n;

crypto/bn/bn_lib.c:967:5: 
      965.   int BN_get_flags(const BIGNUM *b, int n)
      966.   {
      967. >     return b->flags & n;
      968.   }
      969.   

crypto/bn/bn_lib.c:968:1: return from a call to BN_get_flags
      966.   {
      967.       return b->flags & n;
      968. > }
      969.   
      970.   /* Populate a BN_GENCB structure with an "old"-style callback */

crypto/bn/bn_lib.c:418:9: Condition is false
    416.       bn_check_top(a);
    417.   
    418.       t = BN_get_flags(a, BN_FLG_SECURE) ? BN_secure_new() : BN_new();
                   ^
    419.       if (t == NULL)
    420.           return NULL;

crypto/bn/bn_lib.c:277:1: start of procedure BN_new()
      275.   }
      276.   
      277. > BIGNUM *BN_new(void)
      278.   {
      279.       BIGNUM *ret;

crypto/bn/bn_lib.c:281:9: 
      279.       BIGNUM *ret;
      280.   
      281. >     if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL) {
      282.           BNerr(BN_F_BN_NEW, ERR_R_MALLOC_FAILURE);
      283.           return (NULL);

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/bn/bn_lib.c:281:9: Taking false branch
      279.       BIGNUM *ret;
      280.   
      281.       if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL) {
                     ^
      282.           BNerr(BN_F_BN_NEW, ERR_R_MALLOC_FAILURE);
      283.           return (NULL);

crypto/bn/bn_lib.c:285:5: 
      283.           return (NULL);
      284.       }
      285. >     ret->flags = BN_FLG_MALLOCED;
      286.       bn_check_top(ret);
      287.       return (ret);

crypto/bn/bn_lib.c:287:5: 
      285.       ret->flags = BN_FLG_MALLOCED;
      286.       bn_check_top(ret);
      287. >     return (ret);
      288.   }
      289.   

crypto/bn/bn_lib.c:288:1: return from a call to BN_new
      286.       bn_check_top(ret);
      287.       return (ret);
      288. > }
      289.   
      290.    BIGNUM *BN_secure_new(void)

crypto/bn/bn_lib.c:418:5: 
    416.       bn_check_top(a);
    417.   
    418. >     t = BN_get_flags(a, BN_FLG_SECURE) ? BN_secure_new() : BN_new();
    419.       if (t == NULL)
    420.           return NULL;

crypto/bn/bn_lib.c:419:9: Taking false branch
    417.   
    418.       t = BN_get_flags(a, BN_FLG_SECURE) ? BN_secure_new() : BN_new();
    419.       if (t == NULL)
                   ^
    420.           return NULL;
    421.       if (!BN_copy(t, a)) {

crypto/bn/bn_lib.c:421:10: Taking false branch
    419.       if (t == NULL)
    420.           return NULL;
    421.       if (!BN_copy(t, a)) {
                    ^
    422.           BN_free(t);
    423.           return NULL;

crypto/bn/bn_lib.c:426:5: 
    424.       }
    425.       bn_check_top(t);
    426. >     return t;
    427.   }
    428.   

crypto/bn/bn_lib.c:427:1: return from a call to BN_dup
    425.       bn_check_top(t);
    426.       return t;
    427. > }
    428.   
    429.   BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)

crypto/dh/dh_rfc5114.c:88:1: 
  86.   }
  87.   
  88. > make_dh(1024_160)
  89.   make_dh(2048_224)
  90.   make_dh(2048_256)

crypto/bn/bn_lib.c:410:1: start of procedure BN_dup()
    408.   }
    409.   
    410. > BIGNUM *BN_dup(const BIGNUM *a)
    411.   {
    412.       BIGNUM *t;

crypto/bn/bn_lib.c:414:9: Taking false branch
    412.       BIGNUM *t;
    413.   
    414.       if (a == NULL)
                   ^
    415.           return NULL;
    416.       bn_check_top(a);

crypto/bn/bn_lib.c:418:9: 
    416.       bn_check_top(a);
    417.   
    418. >     t = BN_get_flags(a, BN_FLG_SECURE) ? BN_secure_new() : BN_new();
    419.       if (t == NULL)
    420.           return NULL;

crypto/bn/bn_lib.c:965:1: start of procedure BN_get_flags()
      963.   }
      964.   
      965. > int BN_get_flags(const BIGNUM *b, int n)
      966.   {
      967.       return b->flags & n;

crypto/bn/bn_lib.c:967:5: 
      965.   int BN_get_flags(const BIGNUM *b, int n)
      966.   {
      967. >     return b->flags & n;
      968.   }
      969.   

crypto/bn/bn_lib.c:968:1: return from a call to BN_get_flags
      966.   {
      967.       return b->flags & n;
      968. > }
      969.   
      970.   /* Populate a BN_GENCB structure with an "old"-style callback */

crypto/bn/bn_lib.c:418:9: Condition is false
    416.       bn_check_top(a);
    417.   
    418.       t = BN_get_flags(a, BN_FLG_SECURE) ? BN_secure_new() : BN_new();
                   ^
    419.       if (t == NULL)
    420.           return NULL;

crypto/bn/bn_lib.c:277:1: start of procedure BN_new()
      275.   }
      276.   
      277. > BIGNUM *BN_new(void)
      278.   {
      279.       BIGNUM *ret;

crypto/bn/bn_lib.c:281:9: 
      279.       BIGNUM *ret;
      280.   
      281. >     if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL) {
      282.           BNerr(BN_F_BN_NEW, ERR_R_MALLOC_FAILURE);
      283.           return (NULL);

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/bn/bn_lib.c:281:9: Taking false branch
      279.       BIGNUM *ret;
      280.   
      281.       if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL) {
                     ^
      282.           BNerr(BN_F_BN_NEW, ERR_R_MALLOC_FAILURE);
      283.           return (NULL);

crypto/bn/bn_lib.c:285:5: 
      283.           return (NULL);
      284.       }
      285. >     ret->flags = BN_FLG_MALLOCED;
      286.       bn_check_top(ret);
      287.       return (ret);

crypto/bn/bn_lib.c:287:5: 
      285.       ret->flags = BN_FLG_MALLOCED;
      286.       bn_check_top(ret);
      287. >     return (ret);
      288.   }
      289.   

crypto/bn/bn_lib.c:288:1: return from a call to BN_new
      286.       bn_check_top(ret);
      287.       return (ret);
      288. > }
      289.   
      290.    BIGNUM *BN_secure_new(void)

crypto/bn/bn_lib.c:418:5: 
    416.       bn_check_top(a);
    417.   
    418. >     t = BN_get_flags(a, BN_FLG_SECURE) ? BN_secure_new() : BN_new();
    419.       if (t == NULL)
    420.           return NULL;

crypto/bn/bn_lib.c:419:9: Taking false branch
    417.   
    418.       t = BN_get_flags(a, BN_FLG_SECURE) ? BN_secure_new() : BN_new();
    419.       if (t == NULL)
                   ^
    420.           return NULL;
    421.       if (!BN_copy(t, a)) {

crypto/bn/bn_lib.c:421:10: Taking false branch
    419.       if (t == NULL)
    420.           return NULL;
    421.       if (!BN_copy(t, a)) {
                    ^
    422.           BN_free(t);
    423.           return NULL;

crypto/bn/bn_lib.c:426:5: 
    424.       }
    425.       bn_check_top(t);
    426. >     return t;
    427.   }
    428.   

crypto/bn/bn_lib.c:427:1: return from a call to BN_dup
    425.       bn_check_top(t);
    426.       return t;
    427. > }
    428.   
    429.   BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)

crypto/dh/dh_rfc5114.c:88:1: Taking false branch
  86.   }
  87.   
  88. > make_dh(1024_160)
  89.   make_dh(2048_224)
  90.   make_dh(2048_256)

crypto/dh/dh_rfc5114.c:88:1: Taking false branch
  86.   }
  87.   
  88. > make_dh(1024_160)
  89.   make_dh(2048_224)
  90.   make_dh(2048_256)

crypto/dh/dh_rfc5114.c:88:1: Taking false branch
  86.   }
  87.   
  88. > make_dh(1024_160)
  89.   make_dh(2048_224)
  90.   make_dh(2048_256)

crypto/dh/dh_rfc5114.c:88:1: return from a call to DH_get_1024_160
  86.   }
  87.   
  88. > make_dh(1024_160)
  89.   make_dh(2048_224)
  90.   make_dh(2048_256)

crypto/dh/dh_pmeth.c:367:9: 
365.               return -2;
366.           }
367. >         EVP_PKEY_assign(pkey, EVP_PKEY_DHX, dh);
368.           return 1;
369.       }

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)

static int pkey_dh_paramgen(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey)
{
    DH *dh = NULL;
    DH_PKEY_CTX *dctx = ctx->data;
    BN_GENCB *pcb;
    int ret;
    if (dctx->rfc5114_param) {
        switch (dctx->rfc5114_param) {
        case 1:
            dh = DH_get_1024_160();
            break;
        case 2:
            dh = DH_get_2048_224();
            break;
        case 3:
            dh = DH_get_2048_256();
            break;
        default:
            return -2;
        }
        EVP_PKEY_assign(pkey, EVP_PKEY_DHX, dh);
        return 1;
    }
    if (ctx->pkey_gencb) {
        pcb = BN_GENCB_new();
        if (pcb == NULL)
            return 0;
        evp_pkey_set_cb_translate(pcb, ctx);
    } else
        pcb = NULL;
#ifndef OPENSSL_NO_DSA
    if (dctx->use_dsa) {
        DSA *dsa_dh;
        dsa_dh = dsa_dh_generate(dctx, pcb);
        BN_GENCB_free(pcb);
        if (dsa_dh == NULL)
            return 0;
        dh = DSA_dup_DH(dsa_dh);
        DSA_free(dsa_dh);
        if (!dh)
            return 0;
        EVP_PKEY_assign(pkey, EVP_PKEY_DHX, dh);
        return 1;
    }
#endif
    dh = DH_new();
    if (dh == NULL) {
        BN_GENCB_free(pcb);
        return 0;
    }
    ret = DH_generate_parameters_ex(dh,
                                    dctx->prime_len, dctx->generator, pcb);
    BN_GENCB_free(pcb);
    if (ret)
        EVP_PKEY_assign_DH(pkey, dh);
    else
        DH_free(dh);
    return ret;
}
['static int pkey_dh_paramgen(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey)\n{\n    DH *dh = NULL;\n    DH_PKEY_CTX *dctx = ctx->data;\n    BN_GENCB *pcb;\n    int ret;\n    if (dctx->rfc5114_param) {\n        switch (dctx->rfc5114_param) {\n        case 1:\n            dh = DH_get_1024_160();\n            break;\n        case 2:\n            dh = DH_get_2048_224();\n            break;\n        case 3:\n            dh = DH_get_2048_256();\n            break;\n        default:\n            return -2;\n        }\n        EVP_PKEY_assign(pkey, EVP_PKEY_DHX, dh);\n        return 1;\n    }\n    if (ctx->pkey_gencb) {\n        pcb = BN_GENCB_new();\n        if (pcb == NULL)\n            return 0;\n        evp_pkey_set_cb_translate(pcb, ctx);\n    } else\n        pcb = NULL;\n#ifndef OPENSSL_NO_DSA\n    if (dctx->use_dsa) {\n        DSA *dsa_dh;\n        dsa_dh = dsa_dh_generate(dctx, pcb);\n        BN_GENCB_free(pcb);\n        if (dsa_dh == NULL)\n            return 0;\n        dh = DSA_dup_DH(dsa_dh);\n        DSA_free(dsa_dh);\n        if (!dh)\n            return 0;\n        EVP_PKEY_assign(pkey, EVP_PKEY_DHX, dh);\n        return 1;\n    }\n#endif\n    dh = DH_new();\n    if (dh == NULL) {\n        BN_GENCB_free(pcb);\n        return 0;\n    }\n    ret = DH_generate_parameters_ex(dh,\n                                    dctx->prime_len, dctx->generator, pcb);\n    BN_GENCB_free(pcb);\n    if (ret)\n        EVP_PKEY_assign_DH(pkey, dh);\n    else\n        DH_free(dh);\n    return ret;\n}', 'make_dh(1024_160)', 'BIGNUM *BN_dup(const BIGNUM *a)\n{\n    BIGNUM *t;\n    if (a == NULL)\n        return NULL;\n    bn_check_top(a);\n    t = BN_get_flags(a, BN_FLG_SECURE) ? BN_secure_new() : BN_new();\n    if (t == NULL)\n        return NULL;\n    if (!BN_copy(t, a)) {\n        BN_free(t);\n        return NULL;\n    }\n    bn_check_top(t);\n    return t;\n}', 'int BN_get_flags(const BIGNUM *b, int n)\n{\n    return b->flags & n;\n}', 'BIGNUM *BN_new(void)\n{\n    BIGNUM *ret;\n    if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL) {\n        BNerr(BN_F_BN_NEW, ERR_R_MALLOC_FAILURE);\n        return (NULL);\n    }\n    ret->flags = BN_FLG_MALLOCED;\n    bn_check_top(ret);\n    return (ret);\n}', 'void *CRYPTO_zalloc(size_t num, const char *file, int line)\n{\n    void *ret = CRYPTO_malloc(num, file, line);\n    if (ret != NULL)\n        memset(ret, 0, num);\n    return ret;\n}', 'void *CRYPTO_malloc(size_t num, const char *file, int line)\n{\n    void *ret = NULL;\n    if (num <= 0)\n        return NULL;\n    allow_customize = 0;\n#ifndef OPENSSL_NO_CRYPTO_MDEBUG\n    if (call_malloc_debug) {\n        CRYPTO_mem_debug_malloc(NULL, num, 0, file, line);\n        ret = malloc(num);\n        CRYPTO_mem_debug_malloc(ret, num, 1, file, line);\n    } else {\n        ret = malloc(num);\n    }\n#else\n    (void)file;\n    (void)line;\n    ret = malloc(num);\n#endif\n#ifndef OPENSSL_CPUID_OBJ\n    if (ret && (num > 2048)) {\n        extern unsigned char cleanse_ctr;\n        ((unsigned char *)ret)[0] = cleanse_ctr;\n    }\n#endif\n    return ret;\n}', 'int EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key)\n{\n    if (pkey == NULL || !EVP_PKEY_set_type(pkey, type))\n        return 0;\n    pkey->pkey.ptr = key;\n    return (key != NULL);\n}', 'int EVP_PKEY_set_type(EVP_PKEY *pkey, int type)\n{\n    return pkey_set_type(pkey, type, NULL, -1);\n}']