From: Arran Cudbard-Bell Date: Fri, 25 Jun 2021 13:36:50 +0000 (-0500) Subject: Fix ordering issue X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6984a1c4164bc841b6f48c3d5cce3ec82216c2ea;p=thirdparty%2Ffreeradius-server.git Fix ordering issue --- diff --git a/src/lib/tls/cache.c b/src/lib/tls/cache.c index c49e350f151..d47cfa2475d 100644 --- a/src/lib/tls/cache.c +++ b/src/lib/tls/cache.c @@ -625,12 +625,6 @@ static int tls_cache_store_cb(SSL *ssl, SSL_SESSION *sess) unsigned int id_len; uint8_t const *id; - /* - * Request was cancelled, just get OpenSSL to - * free the session data, and don't do any work. - */ - if (unlang_request_is_cancelled(request)) return 0; - /* * This functions should only be called once during the lifetime * of the tls_session, as the fields aren't re-populated on @@ -640,6 +634,12 @@ static int tls_cache_store_cb(SSL *ssl, SSL_SESSION *sess) request = fr_tls_session_request(tls_session->ssl); tls_cache = tls_session->cache; + /* + * Request was cancelled, just get OpenSSL to + * free the session data, and don't do any work. + */ + if (unlang_request_is_cancelled(request)) return 0; + id = SSL_SESSION_get_id(sess, &id_len); RDEBUG3("Requested session store - ID %pV", fr_box_octets(id, id_len)); /*