apps/testdsa.h:78: error: MEMORY_LEAK
  memory dynamically allocated to `dsa` by call to `DSA_new()` at line 74, column 11 is not reachable after line 78, column 7.
Showing all 25 steps of the trace


apps/testdsa.h:70:1: start of procedure get_dsa1024()
68.   	};
69.   
70. > DSA *get_dsa1024()
71.   	{
72.   	DSA *dsa;

apps/testdsa.h:74:6: 
72.   	DSA *dsa;
73.   
74. > 	if ((dsa=DSA_new()) == NULL) return(NULL);
75.   	dsa->p=BN_bin2bn(dsa1024_p,sizeof(dsa1024_p),NULL);
76.   	dsa->q=BN_bin2bn(dsa1024_q,sizeof(dsa1024_q),NULL);

crypto/dsa/dsa_lib.c:69:1: start of procedure DSA_new()
  67.   const char *DSA_version="DSA" OPENSSL_VERSION_PTEXT;
  68.   
  69. > DSA *DSA_new(void)
  70.   	{
  71.   	DSA *ret;

crypto/dsa/dsa_lib.c:73:2: 
  71.   	DSA *ret;
  72.   
  73. > 	ret=(DSA *)Malloc(sizeof(DSA));
  74.   	if (ret == NULL)
  75.   		{

crypto/dsa/dsa_lib.c:74:6: Taking false branch
  72.   
  73.   	ret=(DSA *)Malloc(sizeof(DSA));
  74.   	if (ret == NULL)
             ^
  75.   		{
  76.   		DSAerr(DSA_F_DSA_NEW,ERR_R_MALLOC_FAILURE);

crypto/dsa/dsa_lib.c:79:2: 
  77.   		return(NULL);
  78.   		}
  79. > 	ret->pad=0;
  80.   	ret->version=0;
  81.   	ret->write_params=1;

crypto/dsa/dsa_lib.c:80:2: 
  78.   		}
  79.   	ret->pad=0;
  80. > 	ret->version=0;
  81.   	ret->write_params=1;
  82.   	ret->p=NULL;

crypto/dsa/dsa_lib.c:81:2: 
  79.   	ret->pad=0;
  80.   	ret->version=0;
  81. > 	ret->write_params=1;
  82.   	ret->p=NULL;
  83.   	ret->q=NULL;

crypto/dsa/dsa_lib.c:82:2: 
  80.   	ret->version=0;
  81.   	ret->write_params=1;
  82. > 	ret->p=NULL;
  83.   	ret->q=NULL;
  84.   	ret->g=NULL;

crypto/dsa/dsa_lib.c:83:2: 
  81.   	ret->write_params=1;
  82.   	ret->p=NULL;
  83. > 	ret->q=NULL;
  84.   	ret->g=NULL;
  85.   	ret->flags=DSA_FLAG_CACHE_MONT_P;

crypto/dsa/dsa_lib.c:84:2: 
  82.   	ret->p=NULL;
  83.   	ret->q=NULL;
  84. > 	ret->g=NULL;
  85.   	ret->flags=DSA_FLAG_CACHE_MONT_P;
  86.   

crypto/dsa/dsa_lib.c:85:2: 
  83.   	ret->q=NULL;
  84.   	ret->g=NULL;
  85. > 	ret->flags=DSA_FLAG_CACHE_MONT_P;
  86.   
  87.   	ret->pub_key=NULL;

crypto/dsa/dsa_lib.c:87:2: 
  85.   	ret->flags=DSA_FLAG_CACHE_MONT_P;
  86.   
  87. > 	ret->pub_key=NULL;
  88.   	ret->priv_key=NULL;
  89.   

crypto/dsa/dsa_lib.c:88:2: 
  86.   
  87.   	ret->pub_key=NULL;
  88. > 	ret->priv_key=NULL;
  89.   
  90.   	ret->kinv=NULL;

crypto/dsa/dsa_lib.c:90:2: 
  88.   	ret->priv_key=NULL;
  89.   
  90. > 	ret->kinv=NULL;
  91.   	ret->r=NULL;
  92.   	ret->method_mont_p=NULL;

crypto/dsa/dsa_lib.c:91:2: 
  89.   
  90.   	ret->kinv=NULL;
  91. > 	ret->r=NULL;
  92.   	ret->method_mont_p=NULL;
  93.   

crypto/dsa/dsa_lib.c:92:2: 
  90.   	ret->kinv=NULL;
  91.   	ret->r=NULL;
  92. > 	ret->method_mont_p=NULL;
  93.   
  94.   	ret->references=1;

crypto/dsa/dsa_lib.c:94:2: 
  92.   	ret->method_mont_p=NULL;
  93.   
  94. > 	ret->references=1;
  95.   	return(ret);
  96.   	}

crypto/dsa/dsa_lib.c:95:2: 
  93.   
  94.   	ret->references=1;
  95. > 	return(ret);
  96.   	}
  97.   

crypto/dsa/dsa_lib.c:96:2: return from a call to DSA_new
  94.   	ret->references=1;
  95.   	return(ret);
  96.   	}
         ^
  97.   
  98.   void DSA_free(DSA *r)

apps/testdsa.h:74:6: Taking false branch
72.   	DSA *dsa;
73.   
74.   	if ((dsa=DSA_new()) == NULL) return(NULL);
           ^
75.   	dsa->p=BN_bin2bn(dsa1024_p,sizeof(dsa1024_p),NULL);
76.   	dsa->q=BN_bin2bn(dsa1024_q,sizeof(dsa1024_q),NULL);

apps/testdsa.h:75:2: Skipping BN_bin2bn(): empty list of specs
73.   
74.   	if ((dsa=DSA_new()) == NULL) return(NULL);
75.   	dsa->p=BN_bin2bn(dsa1024_p,sizeof(dsa1024_p),NULL);
       ^
76.   	dsa->q=BN_bin2bn(dsa1024_q,sizeof(dsa1024_q),NULL);
77.   	dsa->g=BN_bin2bn(dsa1024_g,sizeof(dsa1024_g),NULL);

apps/testdsa.h:76:2: Skipping BN_bin2bn(): empty list of specs
74.   	if ((dsa=DSA_new()) == NULL) return(NULL);
75.   	dsa->p=BN_bin2bn(dsa1024_p,sizeof(dsa1024_p),NULL);
76.   	dsa->q=BN_bin2bn(dsa1024_q,sizeof(dsa1024_q),NULL);
       ^
77.   	dsa->g=BN_bin2bn(dsa1024_g,sizeof(dsa1024_g),NULL);
78.   	if ((dsa->p == NULL) || (dsa->q == NULL) || (dsa->g == NULL))

apps/testdsa.h:77:2: Skipping BN_bin2bn(): empty list of specs
75.   	dsa->p=BN_bin2bn(dsa1024_p,sizeof(dsa1024_p),NULL);
76.   	dsa->q=BN_bin2bn(dsa1024_q,sizeof(dsa1024_q),NULL);
77.   	dsa->g=BN_bin2bn(dsa1024_g,sizeof(dsa1024_g),NULL);
       ^
78.   	if ((dsa->p == NULL) || (dsa->q == NULL) || (dsa->g == NULL))
79.   		return(NULL);

apps/testdsa.h:78:7: Taking true branch
76.   	dsa->q=BN_bin2bn(dsa1024_q,sizeof(dsa1024_q),NULL);
77.   	dsa->g=BN_bin2bn(dsa1024_g,sizeof(dsa1024_g),NULL);
78.   	if ((dsa->p == NULL) || (dsa->q == NULL) || (dsa->g == NULL))
            ^
79.   		return(NULL);
80.   	return(dsa);

DSA *get_dsa1024()
	{
	DSA *dsa;
	if ((dsa=DSA_new()) == NULL) return(NULL);
	dsa->p=BN_bin2bn(dsa1024_p,sizeof(dsa1024_p),NULL);
	dsa->q=BN_bin2bn(dsa1024_q,sizeof(dsa1024_q),NULL);
	dsa->g=BN_bin2bn(dsa1024_g,sizeof(dsa1024_g),NULL);
	if ((dsa->p == NULL) || (dsa->q == NULL) || (dsa->g == NULL))
		return(NULL);
	return(dsa);
	}
['DSA *get_dsa1024()\n\t{\n\tDSA *dsa;\n\tif ((dsa=DSA_new()) == NULL) return(NULL);\n\tdsa->p=BN_bin2bn(dsa1024_p,sizeof(dsa1024_p),NULL);\n\tdsa->q=BN_bin2bn(dsa1024_q,sizeof(dsa1024_q),NULL);\n\tdsa->g=BN_bin2bn(dsa1024_g,sizeof(dsa1024_g),NULL);\n\tif ((dsa->p == NULL) || (dsa->q == NULL) || (dsa->g == NULL))\n\t\treturn(NULL);\n\treturn(dsa);\n\t}', 'DSA *DSA_new(void)\n\t{\n\tDSA *ret;\n\tret=(DSA *)Malloc(sizeof(DSA));\n\tif (ret == NULL)\n\t\t{\n\t\tDSAerr(DSA_F_DSA_NEW,ERR_R_MALLOC_FAILURE);\n\t\treturn(NULL);\n\t\t}\n\tret->pad=0;\n\tret->version=0;\n\tret->write_params=1;\n\tret->p=NULL;\n\tret->q=NULL;\n\tret->g=NULL;\n\tret->flags=DSA_FLAG_CACHE_MONT_P;\n\tret->pub_key=NULL;\n\tret->priv_key=NULL;\n\tret->kinv=NULL;\n\tret->r=NULL;\n\tret->method_mont_p=NULL;\n\tret->references=1;\n\treturn(ret);\n\t}']