Port fix for Coverity bug #41 from 1.1.x
[freeradius.git] / src / modules / rlm_eap / libeap / eap_tls.c
index 7a0ab48..db14838 100644 (file)
@@ -377,7 +377,8 @@ static eaptls_status_t eaptls_verify(EAP_HANDLER *handler)
                         * 2. If EAP-response received, then its M bit not set.
                         *      (It is because Last fragment will not have M bit set)
                         */
-                       if ((prev_eap_ds->response == NULL) ||
+                       if (!prev_eap_ds ||
+                           (prev_eap_ds->response == NULL) ||
                            (eaptls_prev == NULL) ||
                            !TLS_MORE_FRAGMENTS(eaptls_prev->flags)) {