coap_session.c: Fix CID 1583526

This commit is contained in:
Jon Shallow authored and Jon Shallow committed 2024-02-12 14:01:49 +00:00
1 parent bfbfd69ff5
commit 841626f64f
1 file changed
+2 -1
+2 -1
View File
@@ -1837,7 +1837,8 @@ coap_free_endpoint(coap_endpoint_t *ep) {
if (ep) {
coap_session_t *session, *rtmp;
coap_lock_check_locked(ep->context);
if (ep->context)
coap_lock_check_locked(ep->context);
SESSIONS_ITER_SAFE(ep->sessions, session, rtmp) {
assert(session->ref == 0);
if (session->ref == 0) {