crypto/dsa/dsa_vrf.c:155: error: MEMORY_LEAK
  memory dynamically allocated by call to `DSA_SIG_new()` at line 153, column 6 is not reachable after line 155, column 6.
Showing all 12 steps of the trace


crypto/dsa/dsa_vrf.c:147:1: start of procedure DSA_verify()
145.    *     -1: error
146.    */
147. > int DSA_verify(int type, const unsigned char *dgst, int dgst_len,
148.   	     unsigned char *sigbuf, int siglen, DSA *dsa)
149.   	{

crypto/dsa/dsa_vrf.c:151:2: 
149.   	{
150.   	DSA_SIG *s;
151. > 	int ret=-1;
152.   
153.   	s = DSA_SIG_new();

crypto/dsa/dsa_vrf.c:153:2: 
151.   	int ret=-1;
152.   
153. > 	s = DSA_SIG_new();
154.   	if (s == NULL) return(ret);
155.   	if (d2i_DSA_SIG(&s,&sigbuf,siglen) == NULL) goto err;

crypto/dsa/dsa_asn1.c:9:1: start of procedure DSA_SIG_new()
  7.   #include <openssl/asn1_mac.h>
  8.   
  9. > DSA_SIG *DSA_SIG_new(void)
  10.   {
  11.   	DSA_SIG *ret;

crypto/dsa/dsa_asn1.c:13:2: 
  11.   	DSA_SIG *ret;
  12.   
  13. > 	ret = Malloc(sizeof(DSA_SIG));
  14.   	if (ret == NULL)
  15.   		{

crypto/dsa/dsa_asn1.c:14:6: Taking false branch
  12.   
  13.   	ret = Malloc(sizeof(DSA_SIG));
  14.   	if (ret == NULL)
             ^
  15.   		{
  16.   		DSAerr(DSA_F_DSA_SIG_NEW,ERR_R_MALLOC_FAILURE);

crypto/dsa/dsa_asn1.c:19:2: 
  17.   		return(NULL);
  18.   		}
  19. > 	ret->r = NULL;
  20.   	ret->s = NULL;
  21.   	return(ret);

crypto/dsa/dsa_asn1.c:20:2: 
  18.   		}
  19.   	ret->r = NULL;
  20. > 	ret->s = NULL;
  21.   	return(ret);
  22.   }

crypto/dsa/dsa_asn1.c:21:2: 
  19.   	ret->r = NULL;
  20.   	ret->s = NULL;
  21. > 	return(ret);
  22.   }
  23.   

crypto/dsa/dsa_asn1.c:22:1: return from a call to DSA_SIG_new
  20.   	ret->s = NULL;
  21.   	return(ret);
  22. > }
  23.   
  24.   void DSA_SIG_free(DSA_SIG *r)

crypto/dsa/dsa_vrf.c:154:6: Taking false branch
152.   
153.   	s = DSA_SIG_new();
154.   	if (s == NULL) return(ret);
            ^
155.   	if (d2i_DSA_SIG(&s,&sigbuf,siglen) == NULL) goto err;
156.   	ret=DSA_do_verify(dgst,dgst_len,s,dsa);

crypto/dsa/dsa_vrf.c:155:6: Skipping d2i_DSA_SIG(): empty list of specs
153.   	s = DSA_SIG_new();
154.   	if (s == NULL) return(ret);
155.   	if (d2i_DSA_SIG(&s,&sigbuf,siglen) == NULL) goto err;
            ^
156.   	ret=DSA_do_verify(dgst,dgst_len,s,dsa);
157.   err:

int DSA_verify(int type, const unsigned char *dgst, int dgst_len,
	     unsigned char *sigbuf, int siglen, DSA *dsa)
	{
	DSA_SIG *s;
	int ret=-1;
	s = DSA_SIG_new();
	if (s == NULL) return(ret);
	if (d2i_DSA_SIG(&s,&sigbuf,siglen) == NULL) goto err;
	ret=DSA_do_verify(dgst,dgst_len,s,dsa);
err:
	DSA_SIG_free(s);
	return(ret);
	}
['int DSA_verify(int type, const unsigned char *dgst, int dgst_len,\n\t     unsigned char *sigbuf, int siglen, DSA *dsa)\n\t{\n\tDSA_SIG *s;\n\tint ret=-1;\n\ts = DSA_SIG_new();\n\tif (s == NULL) return(ret);\n\tif (d2i_DSA_SIG(&s,&sigbuf,siglen) == NULL) goto err;\n\tret=DSA_do_verify(dgst,dgst_len,s,dsa);\nerr:\n\tDSA_SIG_free(s);\n\treturn(ret);\n\t}', 'DSA_SIG *DSA_SIG_new(void)\n{\n\tDSA_SIG *ret;\n\tret = Malloc(sizeof(DSA_SIG));\n\tif (ret == NULL)\n\t\t{\n\t\tDSAerr(DSA_F_DSA_SIG_NEW,ERR_R_MALLOC_FAILURE);\n\t\treturn(NULL);\n\t\t}\n\tret->r = NULL;\n\tret->s = NULL;\n\treturn(ret);\n}']