Fixes from clang / scan-build
[freeradius.git] / src / modules / rlm_eap / types / rlm_eap_ttls / ttls.c
index c3fde1c..fc2aca3 100644 (file)
@@ -618,6 +618,8 @@ static int process_reply(EAP_HANDLER *handler, tls_session_t *tls_session,
        ttls_tunnel_t *t = tls_session->opaque;
 
        handler = handler;      /* -Wunused */
+       rad_assert(request != NULL);
+       rad_assert(handler->request == request);
 
        /*
         *      If the response packet was Access-Accept, then
@@ -789,6 +791,7 @@ static int eapttls_postproxy(EAP_HANDLER *handler, void *data)
        tls_session_t *tls_session = (tls_session_t *) data;
        REQUEST *fake, *request = handler->request;
 
+       rad_assert(request != NULL);
        RDEBUG("Passing reply from proxy back into the tunnel.");
 
        /*
@@ -929,6 +932,8 @@ int eapttls_process(EAP_HANDLER *handler, tls_session_t *tls_session)
        size_t data_len;
        REQUEST *request = handler->request;
 
+       rad_assert(request != NULL);
+
        /*
         *      Just look at the buffer directly, without doing
         *      record_minus.