Skip to content

Commit 841626f

Browse files
committed
coap_session.c: Fix CID 1583526
1 parent bfbfd69 commit 841626f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/coap_session.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -1837,7 +1837,8 @@ coap_free_endpoint(coap_endpoint_t *ep) {
18371837
if (ep) {
18381838
coap_session_t *session, *rtmp;
18391839

1840-
coap_lock_check_locked(ep->context);
1840+
if (ep->context)
1841+
coap_lock_check_locked(ep->context);
18411842
SESSIONS_ITER_SAFE(ep->sessions, session, rtmp) {
18421843
assert(session->ref == 0);
18431844
if (session->ref == 0) {

0 commit comments

Comments
 (0)