crypto/x509v3/v3_conf.c:178: error: MEMORY_LEAK
  memory dynamically allocated by call to `malloc()` at line 170, column 17 is not reachable after line 178, column 6.
Showing all 34 steps of the trace


crypto/x509v3/v3_conf.c:161:1: start of procedure do_ext_i2d()
159.   }
160.   
161. > static X509_EXTENSION *do_ext_i2d(X509V3_EXT_METHOD *method, int ext_nid,
162.   						 int crit, void *ext_struc)
163.   {

crypto/x509v3/v3_conf.c:169:2: Skipping __function_pointer__(): unresolved function pointer
167.   	X509_EXTENSION *ext;
168.   	/* Convert internal representation to DER */
169.   	ext_len = method->i2d(ext_struc, NULL);
        ^
170.   	if(!(ext_der = Malloc(ext_len))) goto merr;
171.   	p = ext_der;

crypto/x509v3/v3_conf.c:170:7: Taking false branch
168.   	/* Convert internal representation to DER */
169.   	ext_len = method->i2d(ext_struc, NULL);
170.   	if(!(ext_der = Malloc(ext_len))) goto merr;
             ^
171.   	p = ext_der;
172.   	method->i2d(ext_struc, &p);

crypto/x509v3/v3_conf.c:171:2: 
169.   	ext_len = method->i2d(ext_struc, NULL);
170.   	if(!(ext_der = Malloc(ext_len))) goto merr;
171. > 	p = ext_der;
172.   	method->i2d(ext_struc, &p);
173.   	if(!(ext_oct = M_ASN1_OCTET_STRING_new())) goto merr;

crypto/x509v3/v3_conf.c:172:2: Skipping __function_pointer__(): unresolved function pointer
170.   	if(!(ext_der = Malloc(ext_len))) goto merr;
171.   	p = ext_der;
172.   	method->i2d(ext_struc, &p);
        ^
173.   	if(!(ext_oct = M_ASN1_OCTET_STRING_new())) goto merr;
174.   	ext_oct->data = ext_der;

crypto/x509v3/v3_conf.c:173:7: 
171.   	p = ext_der;
172.   	method->i2d(ext_struc, &p);
173. > 	if(!(ext_oct = M_ASN1_OCTET_STRING_new())) goto merr;
174.   	ext_oct->data = ext_der;
175.   	ext_oct->length = ext_len;

crypto/asn1/asn1_lib.c:364:1: start of procedure ASN1_STRING_type_new()
  362.   
  363.   
  364. > ASN1_STRING *ASN1_STRING_type_new(int type)
  365.   	{
  366.   	ASN1_STRING *ret;

crypto/asn1/asn1_lib.c:368:2: 
  366.   	ASN1_STRING *ret;
  367.   
  368. > 	ret=(ASN1_STRING *)Malloc(sizeof(ASN1_STRING));
  369.   	if (ret == NULL)
  370.   		{

crypto/asn1/asn1_lib.c:369:6: Taking false branch
  367.   
  368.   	ret=(ASN1_STRING *)Malloc(sizeof(ASN1_STRING));
  369.   	if (ret == NULL)
              ^
  370.   		{
  371.   		ASN1err(ASN1_F_ASN1_STRING_TYPE_NEW,ERR_R_MALLOC_FAILURE);

crypto/asn1/asn1_lib.c:374:2: 
  372.   		return(NULL);
  373.   		}
  374. > 	ret->length=0;
  375.   	ret->type=type;
  376.   	ret->data=NULL;

crypto/asn1/asn1_lib.c:375:2: 
  373.   		}
  374.   	ret->length=0;
  375. > 	ret->type=type;
  376.   	ret->data=NULL;
  377.   	ret->flags=0;

crypto/asn1/asn1_lib.c:376:2: 
  374.   	ret->length=0;
  375.   	ret->type=type;
  376. > 	ret->data=NULL;
  377.   	ret->flags=0;
  378.   	return(ret);

crypto/asn1/asn1_lib.c:377:2: 
  375.   	ret->type=type;
  376.   	ret->data=NULL;
  377. > 	ret->flags=0;
  378.   	return(ret);
  379.   	}

crypto/asn1/asn1_lib.c:378:2: 
  376.   	ret->data=NULL;
  377.   	ret->flags=0;
  378. > 	return(ret);
  379.   	}
  380.   

crypto/asn1/asn1_lib.c:379:2: return from a call to ASN1_STRING_type_new
  377.   	ret->flags=0;
  378.   	return(ret);
  379.   	}
          ^
  380.   
  381.   void ASN1_STRING_free(ASN1_STRING *a)

crypto/x509v3/v3_conf.c:173:7: Taking false branch
171.   	p = ext_der;
172.   	method->i2d(ext_struc, &p);
173.   	if(!(ext_oct = M_ASN1_OCTET_STRING_new())) goto merr;
             ^
174.   	ext_oct->data = ext_der;
175.   	ext_oct->length = ext_len;

crypto/x509v3/v3_conf.c:174:2: 
172.   	method->i2d(ext_struc, &p);
173.   	if(!(ext_oct = M_ASN1_OCTET_STRING_new())) goto merr;
174. > 	ext_oct->data = ext_der;
175.   	ext_oct->length = ext_len;
176.   	

crypto/x509v3/v3_conf.c:175:2: 
173.   	if(!(ext_oct = M_ASN1_OCTET_STRING_new())) goto merr;
174.   	ext_oct->data = ext_der;
175. > 	ext_oct->length = ext_len;
176.   	
177.   	ext = X509_EXTENSION_create_by_NID(NULL, ext_nid, crit, ext_oct);

crypto/x509v3/v3_conf.c:177:2: 
175.   	ext_oct->length = ext_len;
176.   	
177. > 	ext = X509_EXTENSION_create_by_NID(NULL, ext_nid, crit, ext_oct);
178.   	if(!ext) goto merr;
179.   	M_ASN1_OCTET_STRING_free(ext_oct);

crypto/x509/x509_v3.c:176:1: start of procedure X509_EXTENSION_create_by_NID()
  174.   	}
  175.   
  176. > X509_EXTENSION *X509_EXTENSION_create_by_NID(X509_EXTENSION **ex, int nid,
  177.   	     int crit, ASN1_OCTET_STRING *data)
  178.   	{

crypto/x509/x509_v3.c:182:2: 
  180.   	X509_EXTENSION *ret;
  181.   
  182. > 	obj=OBJ_nid2obj(nid);
  183.   	if (obj == NULL)
  184.   		{

crypto/objects/obj_dat.c:258:1: start of procedure OBJ_nid2obj()
    256.   	}
    257.   
    258. > ASN1_OBJECT *OBJ_nid2obj(int n)
    259.   	{
    260.   	ADDED_OBJ ad,*adp;

crypto/objects/obj_dat.c:263:7: Taking true branch
    261.   	ASN1_OBJECT ob;
    262.   
    263.   	if ((n >= 0) && (n < NUM_NID))
                 ^
    264.   		{
    265.   		if ((n != NID_undef) && (nid_objs[n].nid == NID_undef))

crypto/objects/obj_dat.c:263:19: Taking true branch
    261.   	ASN1_OBJECT ob;
    262.   
    263.   	if ((n >= 0) && (n < NUM_NID))
                             ^
    264.   		{
    265.   		if ((n != NID_undef) && (nid_objs[n].nid == NID_undef))

crypto/objects/obj_dat.c:265:8: Taking false branch
    263.   	if ((n >= 0) && (n < NUM_NID))
    264.   		{
    265.   		if ((n != NID_undef) && (nid_objs[n].nid == NID_undef))
                  ^
    266.   			{
    267.   			OBJerr(OBJ_F_OBJ_NID2OBJ,OBJ_R_UNKNOWN_NID);

crypto/objects/obj_dat.c:270:3: 
    268.   			return(NULL);
    269.   			}
    270. > 		return((ASN1_OBJECT *)&(nid_objs[n]));
    271.   		}
    272.   	else if (added == NULL)

crypto/objects/obj_dat.c:288:2: return from a call to OBJ_nid2obj
    286.   			}
    287.   		}
    288.   	}
            ^
    289.   
    290.   const char *OBJ_nid2sn(int n)

crypto/x509/x509_v3.c:183:6: Taking false branch
  181.   
  182.   	obj=OBJ_nid2obj(nid);
  183.   	if (obj == NULL)
              ^
  184.   		{
  185.   		X509err(X509_F_X509_EXTENSION_CREATE_BY_NID,X509_R_UNKNOWN_NID);

crypto/x509/x509_v3.c:188:2: Skipping X509_EXTENSION_create_by_OBJ(): empty list of specs
  186.   		return(NULL);
  187.   		}
  188.   	ret=X509_EXTENSION_create_by_OBJ(ex,obj,crit,data);
          ^
  189.   	if (ret == NULL) ASN1_OBJECT_free(obj);
  190.   	return(ret);

crypto/x509/x509_v3.c:189:6: Taking true branch
  187.   		}
  188.   	ret=X509_EXTENSION_create_by_OBJ(ex,obj,crit,data);
  189.   	if (ret == NULL) ASN1_OBJECT_free(obj);
              ^
  190.   	return(ret);
  191.   	}

crypto/x509/x509_v3.c:189:19: Skipping ASN1_OBJECT_free(): empty list of specs
  187.   		}
  188.   	ret=X509_EXTENSION_create_by_OBJ(ex,obj,crit,data);
  189.   	if (ret == NULL) ASN1_OBJECT_free(obj);
                           ^
  190.   	return(ret);
  191.   	}

crypto/x509/x509_v3.c:190:2: 
  188.   	ret=X509_EXTENSION_create_by_OBJ(ex,obj,crit,data);
  189.   	if (ret == NULL) ASN1_OBJECT_free(obj);
  190. > 	return(ret);
  191.   	}
  192.   

crypto/x509/x509_v3.c:191:2: return from a call to X509_EXTENSION_create_by_NID
  189.   	if (ret == NULL) ASN1_OBJECT_free(obj);
  190.   	return(ret);
  191.   	}
          ^
  192.   
  193.   X509_EXTENSION *X509_EXTENSION_create_by_OBJ(X509_EXTENSION **ex,

crypto/x509v3/v3_conf.c:178:6: Taking true branch
176.   	
177.   	ext = X509_EXTENSION_create_by_NID(NULL, ext_nid, crit, ext_oct);
178.   	if(!ext) goto merr;
            ^
179.   	M_ASN1_OCTET_STRING_free(ext_oct);
180.   
