crypto/x509/x509spki.c:112: error: MEMORY_LEAK
  memory dynamically allocated by call to `malloc()` at line 110, column 13 is not reachable after line 112, column 19.
Showing all 27 steps of the trace


crypto/x509/x509spki.c:104:1: start of procedure NETSCAPE_SPKI_b64_encode()
102.   /* Generate a base64 encoded string from an SPKI */
103.   
104. > char * NETSCAPE_SPKI_b64_encode(NETSCAPE_SPKI *spki)
105.   {
106.   	unsigned char *der_spki, *p;

crypto/x509/x509spki.c:109:2: 
107.   	char *b64_str;
108.   	int der_len;
109. > 	der_len = i2d_NETSCAPE_SPKI(spki, NULL);
110.   	der_spki = Malloc(der_len);
111.   	b64_str = Malloc(der_len * 2);

crypto/asn1/x_spki.c:115:1: start of procedure i2d_NETSCAPE_SPKI()
  113.   	}
  114.   
  115. > int i2d_NETSCAPE_SPKI(NETSCAPE_SPKI *a, unsigned char **pp)
  116.   	{
  117.   	M_ASN1_I2D_vars(a);

crypto/asn1/x_spki.c:117:2: Taking false branch
  115.   int i2d_NETSCAPE_SPKI(NETSCAPE_SPKI *a, unsigned char **pp)
  116.   	{
  117.   	M_ASN1_I2D_vars(a);
          ^
  118.   
  119.   	M_ASN1_I2D_len(a->spkac,	i2d_NETSCAPE_SPKAC);

crypto/asn1/x_spki.c:119:2: Skipping i2d_NETSCAPE_SPKAC(): empty list of specs
  117.   	M_ASN1_I2D_vars(a);
  118.   
  119.   	M_ASN1_I2D_len(a->spkac,	i2d_NETSCAPE_SPKAC);
          ^
  120.   	M_ASN1_I2D_len(a->sig_algor,	i2d_X509_ALGOR);
  121.   	M_ASN1_I2D_len(a->signature,	i2d_ASN1_BIT_STRING);

crypto/asn1/x_spki.c:120:2: Skipping i2d_X509_ALGOR(): empty list of specs
  118.   
  119.   	M_ASN1_I2D_len(a->spkac,	i2d_NETSCAPE_SPKAC);
  120.   	M_ASN1_I2D_len(a->sig_algor,	i2d_X509_ALGOR);
          ^
  121.   	M_ASN1_I2D_len(a->signature,	i2d_ASN1_BIT_STRING);
  122.   

crypto/asn1/x_spki.c:121:2: Skipping i2d_ASN1_BIT_STRING(): empty list of specs
  119.   	M_ASN1_I2D_len(a->spkac,	i2d_NETSCAPE_SPKAC);
  120.   	M_ASN1_I2D_len(a->sig_algor,	i2d_X509_ALGOR);
  121.   	M_ASN1_I2D_len(a->signature,	i2d_ASN1_BIT_STRING);
          ^
  122.   
  123.   	M_ASN1_I2D_seq_total();

crypto/asn1/x_spki.c:123:2: 
  121.   	M_ASN1_I2D_len(a->signature,	i2d_ASN1_BIT_STRING);
  122.   
  123. > 	M_ASN1_I2D_seq_total();
  124.   
  125.   	M_ASN1_I2D_put(a->spkac,	i2d_NETSCAPE_SPKAC);

crypto/asn1/asn1_lib.c:230:1: start of procedure ASN1_object_size()
    228.   	}
    229.   
    230. > int ASN1_object_size(int constructed, int length, int tag)
    231.   	{
    232.   	int ret;

crypto/asn1/asn1_lib.c:234:2: 
    232.   	int ret;
    233.   
    234. > 	ret=length;
    235.   	ret++;
    236.   	if (tag >= 31)

crypto/asn1/asn1_lib.c:235:2: 
    233.   
    234.   	ret=length;
    235. > 	ret++;
    236.   	if (tag >= 31)
    237.   		{

crypto/asn1/asn1_lib.c:236:6: Taking false branch
    234.   	ret=length;
    235.   	ret++;
    236.   	if (tag >= 31)
                ^
    237.   		{
    238.   		while (tag > 0)

crypto/asn1/asn1_lib.c:244:7: Taking false branch
    242.   			}
    243.   		}
    244.   	if ((length == 0) && (constructed == 2))
                 ^
    245.   		ret+=2;
    246.   	ret++;

crypto/asn1/asn1_lib.c:246:2: 
    244.   	if ((length == 0) && (constructed == 2))
    245.   		ret+=2;
    246. > 	ret++;
    247.   	if (length > 127)
    248.   		{

crypto/asn1/asn1_lib.c:247:6: Taking true branch
    245.   		ret+=2;
    246.   	ret++;
    247.   	if (length > 127)
                ^
    248.   		{
    249.   		while (length > 0)

crypto/asn1/asn1_lib.c:249:10: Loop condition is true. Entering loop body
    247.   	if (length > 127)
    248.   		{
    249.   		while (length > 0)
                    ^
    250.   			{
    251.   			length>>=8;

crypto/asn1/asn1_lib.c:251:4: 
    249.   		while (length > 0)
    250.   			{
    251. > 			length>>=8;
    252.   			ret++;
    253.   			}

crypto/asn1/asn1_lib.c:252:4: 
    250.   			{
    251.   			length>>=8;
    252. > 			ret++;
    253.   			}
    254.   		}

crypto/asn1/asn1_lib.c:249:10: Loop condition is false. Leaving loop
    247.   	if (length > 127)
    248.   		{
    249.   		while (length > 0)
                    ^
    250.   			{
    251.   			length>>=8;

crypto/asn1/asn1_lib.c:255:2: 
    253.   			}
    254.   		}
    255. > 	return(ret);
    256.   	}
    257.   

crypto/asn1/asn1_lib.c:256:2: return from a call to ASN1_object_size
    254.   		}
    255.   	return(ret);
    256.   	}
            ^
    257.   
    258.   int asn1_Finish(ASN1_CTX *c)

crypto/asn1/x_spki.c:123:2: Taking true branch
  121.   	M_ASN1_I2D_len(a->signature,	i2d_ASN1_BIT_STRING);
  122.   
  123.   	M_ASN1_I2D_seq_total();
          ^
  124.   
  125.   	M_ASN1_I2D_put(a->spkac,	i2d_NETSCAPE_SPKAC);

crypto/asn1/x_spki.c:130:2: return from a call to i2d_NETSCAPE_SPKI
  128.   
  129.   	M_ASN1_I2D_finish();
  130.   	}
          ^
  131.   
  132.   NETSCAPE_SPKI *d2i_NETSCAPE_SPKI(NETSCAPE_SPKI **a, unsigned char **pp,

crypto/x509/x509spki.c:110:2: 
108.   	int der_len;
109.   	der_len = i2d_NETSCAPE_SPKI(spki, NULL);
110. > 	der_spki = Malloc(der_len);
111.   	b64_str = Malloc(der_len * 2);
112.   	if(!der_spki || !b64_str) {

crypto/x509/x509spki.c:111:2: 
109.   	der_len = i2d_NETSCAPE_SPKI(spki, NULL);
110.   	der_spki = Malloc(der_len);
111. > 	b64_str = Malloc(der_len * 2);
112.   	if(!der_spki || !b64_str) {
113.   		X509err(X509_F_NETSCAPE_SPKI_B64_ENCODE, ERR_R_MALLOC_FAILURE);

crypto/x509/x509spki.c:112:6: Taking false branch
110.   	der_spki = Malloc(der_len);
111.   	b64_str = Malloc(der_len * 2);
112.   	if(!der_spki || !b64_str) {
            ^
113.   		X509err(X509_F_NETSCAPE_SPKI_B64_ENCODE, ERR_R_MALLOC_FAILURE);
114.   		return NULL;

crypto/x509/x509spki.c:112:19: Taking true branch
110.   	der_spki = Malloc(der_len);
111.   	b64_str = Malloc(der_len * 2);
112.   	if(!der_spki || !b64_str) {
                         ^
113.   		X509err(X509_F_NETSCAPE_SPKI_B64_ENCODE, ERR_R_MALLOC_FAILURE);
114.   		return NULL;
