return NULL;
Xfree(ret); return NULL;
static ExtdSegment create_ctextseg(value,num)char **value;int num;{    ExtdSegment ret;    char side_str[128],*ptr;    char cset_name[128],*tmp;    int i,new;    FontScope scope;    ret = (ExtdSegment)Xmalloc(sizeof(ExtdSegmentRec));    if(ret == NULL){        return NULL;    }    if(strchr(value[0],':')){        ret->name = (char *)Xmalloc(strlen(value[0])+1);        if(ret->name == NULL){            return NULL; /* XXX ick, without freeing ret */        }        strcpy(ret->name,value[0]);        ptr = strchr(ret->name,':');        *ptr = '\0';        ptr++;        if( !_XlcNCompareISOLatin1(ptr, "none", 4) ){            ret->side =  XlcNONE ;            sprintf(cset_name,"%s:%s",ret->name,"none");        } else        if( !_XlcNCompareISOLatin1(ptr, "GL", 2) ){            ret->side =  XlcGL ;            sprintf(cset_name,"%s:%s",ret->name,"GL");        } else {            ret->side =  XlcGR ;            sprintf(cset_name,"%s:%s",ret->name,"GR");        }    } else {        ret->name = (char *)Xmalloc(strlen(value[0])+1);        if(ret->name == NULL){            return NULL; /* XXX ick, without freeing ret */        }        strcpy(ret->name,value[0]);    }    ret->area = (FontScope)Xmalloc((num - 1)*sizeof(FontScopeRec));    if(ret->area == NULL){        return NULL; /* XXX ick, without freeing ret */    }    ret->area_num  = num - 1;    scope = ret->area ;    for(i=1;i<num;i++){        sscanf(value[i],"\\x%lx,\\x%lx",                &scope[i-1].start,&scope[i-1].end);    }    ret->charset = srch_charset_define(cset_name,&new);    if(new){        tmp = (char *)Xmalloc(strlen(cset_name)+1);        if(tmp == NULL){            return NULL; /* XXX ick, without freeing ret */        }        strcpy(tmp,cset_name);        ret->charset->name = tmp;    }    return(ret);}