crypto/asn1/evp_asn1.c:69: error: MEMORY_LEAK
  memory dynamically allocated to `return` by call to `ASN1_STRING_type_new()` at line 68, column 10 is not reachable after line 69, column 43.
Showing all 14 steps of the trace


crypto/asn1/evp_asn1.c:64:1: start of procedure ASN1_TYPE_set_octetstring()
62.   #include "asn1_mac.h"
63.   
64. > int ASN1_TYPE_set_octetstring(ASN1_TYPE *a, unsigned char *data, int len)
65.   	{
66.   	ASN1_STRING *os;

crypto/asn1/evp_asn1.c:68:6: 
66.   	ASN1_STRING *os;
67.   
68. > 	if ((os=ASN1_OCTET_STRING_new()) == NULL) return(0);
69.   	if (!ASN1_OCTET_STRING_set(os,data,len)) return(0);
70.   	ASN1_TYPE_set(a,V_ASN1_OCTET_STRING,(char *)os);

crypto/asn1/asn1_lib.c:368:1: start of procedure ASN1_STRING_type_new()
  366.   
  367.   
  368. > ASN1_STRING *ASN1_STRING_type_new(int type)
  369.   	{
  370.   	ASN1_STRING *ret;

crypto/asn1/asn1_lib.c:372:2: 
  370.   	ASN1_STRING *ret;
  371.   
  372. > 	ret=(ASN1_STRING *)Malloc(sizeof(ASN1_STRING));
  373.   	if (ret == NULL)
  374.   		{

crypto/asn1/asn1_lib.c:373:6: Taking false branch
  371.   
  372.   	ret=(ASN1_STRING *)Malloc(sizeof(ASN1_STRING));
  373.   	if (ret == NULL)
              ^
  374.   		{
  375.   		ASN1err(ASN1_F_ASN1_STRING_TYPE_NEW,ERR_R_MALLOC_FAILURE);

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

crypto/asn1/asn1_lib.c:379:2: 
  377.   		}
  378.   	ret->length=0;
  379. > 	ret->type=type;
  380.   	ret->data=NULL;
  381.   	ret->flags=0;

crypto/asn1/asn1_lib.c:380:2: 
  378.   	ret->length=0;
  379.   	ret->type=type;
  380. > 	ret->data=NULL;
  381.   	ret->flags=0;
  382.   	return(ret);

crypto/asn1/asn1_lib.c:381:2: 
  379.   	ret->type=type;
  380.   	ret->data=NULL;
  381. > 	ret->flags=0;
  382.   	return(ret);
  383.   	}

crypto/asn1/asn1_lib.c:382:2: 
  380.   	ret->data=NULL;
  381.   	ret->flags=0;
  382. > 	return(ret);
  383.   	}
  384.   

crypto/asn1/asn1_lib.c:383:2: return from a call to ASN1_STRING_type_new
  381.   	ret->flags=0;
  382.   	return(ret);
  383.   	}
          ^
  384.   
  385.   void ASN1_STRING_free(ASN1_STRING *a)

crypto/asn1/evp_asn1.c:68:6: Taking false branch
66.   	ASN1_STRING *os;
67.   
68.   	if ((os=ASN1_OCTET_STRING_new()) == NULL) return(0);
           ^
69.   	if (!ASN1_OCTET_STRING_set(os,data,len)) return(0);
70.   	ASN1_TYPE_set(a,V_ASN1_OCTET_STRING,(char *)os);

crypto/asn1/evp_asn1.c:69:7: Taking true branch
67.   
68.   	if ((os=ASN1_OCTET_STRING_new()) == NULL) return(0);
69.   	if (!ASN1_OCTET_STRING_set(os,data,len)) return(0);
            ^
70.   	ASN1_TYPE_set(a,V_ASN1_OCTET_STRING,(char *)os);
71.   	return(1);

crypto/asn1/evp_asn1.c:69:43: 
67.   
68.   	if ((os=ASN1_OCTET_STRING_new()) == NULL) return(0);
69. > 	if (!ASN1_OCTET_STRING_set(os,data,len)) return(0);
70.   	ASN1_TYPE_set(a,V_ASN1_OCTET_STRING,(char *)os);
71.   	return(1);

int ASN1_TYPE_set_octetstring(ASN1_TYPE *a, unsigned char *data, int len)
	{
	ASN1_STRING *os;
	if ((os=ASN1_OCTET_STRING_new()) == NULL) return(0);
	if (!ASN1_OCTET_STRING_set(os,data,len)) return(0);
	ASN1_TYPE_set(a,V_ASN1_OCTET_STRING,(char *)os);
	return(1);
	}
['int ASN1_TYPE_set_octetstring(ASN1_TYPE *a, unsigned char *data, int len)\n\t{\n\tASN1_STRING *os;\n\tif ((os=ASN1_OCTET_STRING_new()) == NULL) return(0);\n\tif (!ASN1_OCTET_STRING_set(os,data,len)) return(0);\n\tASN1_TYPE_set(a,V_ASN1_OCTET_STRING,(char *)os);\n\treturn(1);\n\t}', 'ASN1_STRING *ASN1_STRING_type_new(int type)\n\t{\n\tASN1_STRING *ret;\n\tret=(ASN1_STRING *)Malloc(sizeof(ASN1_STRING));\n\tif (ret == NULL)\n\t\t{\n\t\tASN1err(ASN1_F_ASN1_STRING_TYPE_NEW,ERR_R_MALLOC_FAILURE);\n\t\treturn(NULL);\n\t\t}\n\tret->length=0;\n\tret->type=type;\n\tret->data=NULL;\n\tret->flags=0;\n\treturn(ret);\n\t}']