CRYPTO_free_ex_data(dh_meth,ret,&ret->ex_data);
CRYPTO_free_ex_data(CRYPTO_EX_INDEX_DH, ret, &ret->ex_data);
DH *DH_new_method(ENGINE *engine)#endif	{	const DH_METHOD *meth;	DH *ret;	ret=(DH *)OPENSSL_malloc(sizeof(DH));	if (ret == NULL)		{		DHerr(DH_F_DH_NEW,ERR_R_MALLOC_FAILURE);		return(NULL);		}	if (engine)		{		if(ENGINE_init(engine))			ret->engine = engine;		else 			ret->engine = NULL;		}	else		ret->engine=ENGINE_get_default_DH();	if(ret->engine == NULL)		{		DHerr(DH_F_DH_NEW,ERR_LIB_ENGINE);		OPENSSL_free(ret);		return NULL;		}	meth = ENGINE_get_DH(ret->engine);	ret->pad=0;	ret->version=0;	ret->p=NULL;	ret->g=NULL;	ret->length=0;	ret->pub_key=NULL;	ret->priv_key=NULL;	ret->q=NULL;	ret->j=NULL;	ret->seed = NULL;	ret->seedlen = 0;	ret->counter = NULL;	ret->method_mont_p=NULL;	ret->references = 1;	ret->flags=meth->flags;	CRYPTO_new_ex_data(dh_meth,ret,&ret->ex_data);	if ((meth->init != NULL) && !meth->init(ret))		{		CRYPTO_free_ex_data(dh_meth,ret,&ret->ex_data);		OPENSSL_free(ret);		ret=NULL;		}	return(ret);	}