PJ_DEF(pj_status_t) pjsip_auth_clt_deinit(pjsip_auth_clt_sess *sess)
{
    pjsip_cached_auth *auth;
    
    PJ_ASSERT_RETURN(sess && sess->endpt, PJ_EINVAL);
    
    auth = sess->cached_auth.next;
    while (auth != &sess->cached_auth) {
	pjsip_endpt_release_pool(sess->endpt, auth->pool);
	auth = auth->next;
    }

    return PJ_SUCCESS;
}
PJ_DEF(pj_status_t) pjsip_auth_clt_deinit(pjsip_auth_clt_sess *sess)
{
    pjsip_cached_auth *auth;
    
    PJ_ASSERT_RETURN(sess && sess->endpt, PJ_EINVAL);
    
    auth = sess->cached_auth.next;
    while (auth != &sess->cached_auth) {
	pjsip_endpt_release_pool(sess->endpt, auth->pool);
	auth = auth->next;
    }

    return PJ_SUCCESS;
}