if(!sk_push(gens, (char *)gen)) {
if(!sk_GENERAL_NAME_push(gens, gen)) {
static int copy_email(X509V3_CTX *ctx, STACK *gens){	X509_NAME *nm;	ASN1_IA5STRING *email = NULL;	X509_NAME_ENTRY *ne;	GENERAL_NAME *gen = NULL;	int i;	if(ctx->flags == CTX_TEST) return 1;	if(!ctx || (!ctx->subject_cert && !ctx->subject_req)) {		X509V3err(X509V3_F_COPY_EMAIL,X509V3_R_NO_SUBJECT_DETAILS);		goto err;	}	/* Find the subject name */	if(ctx->subject_cert) nm = X509_get_subject_name(ctx->subject_cert);	else nm = X509_REQ_get_subject_name(ctx->subject_req);	/* Now add any email address(es) to STACK */	i = -1;	while((i = X509_NAME_get_index_by_NID(nm,					 NID_pkcs9_emailAddress, i)) > 0) {		ne = X509_NAME_get_entry(nm, i);		email = ASN1_IA5STRING_dup(X509_NAME_ENTRY_get_data(ne));		if(!email || !(gen = GENERAL_NAME_new())) {			X509V3err(X509V3_F_COPY_EMAIL,ERR_R_MALLOC_FAILURE);			goto err;		}		gen->d.ia5 = email;		email = NULL;		gen->type = GEN_EMAIL;		if(!sk_push(gens, (char *)gen)) {			X509V3err(X509V3_F_COPY_EMAIL,ERR_R_MALLOC_FAILURE);			goto err;		}		gen = NULL;	}		return 1;			err:	GENERAL_NAME_free(gen);	ASN1_IA5STRING_free(email);	return 0;	}