NOEXPORT void sni_free(SERVICE_OPTIONS *section) {
    SERVERNAME_LIST *curr=section->servername_list_head;
    while(curr) {
        SERVERNAME_LIST *next=curr->next;
        str_free(curr->servername);
        service_free(curr->opt); /* free the slave section */
        str_free(curr);
        curr=next;
    }
    section->servername_list_head=NULL;
    section->servername_list_tail=NULL;
}
NOEXPORT void sni_free(SERVICE_OPTIONS *section) {
    SERVERNAME_LIST *curr=section->servername_list_head;
    while(curr) {
        SERVERNAME_LIST *next=curr->next;
        str_free(curr->servername);
        service_free(curr->opt);  
        str_free(curr);
        curr=next;
    }
    section->servername_list_head=NULL;
    section->servername_list_tail=NULL;
}