mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-04 00:45:40 +03:00
coap_session_mfree: Check for lg_crcv all cleared out if failure
Call to coap_cancel_observe_lkd() may cause session->lg_crcv to be cleared out if transmission failure.
This commit is contained in:
1 parent
06ff7e092b
commit
17c3feeb08
1 file changed
+3
@@ -543,6 +543,9 @@ coap_session_mfree(coap_session_t *session) {
|
||||
}
|
||||
}
|
||||
}
|
||||
/* In case coap_cancel_observe_lkd() failure, which could clear down lg_crcv */
|
||||
if (!session->lg_crcv)
|
||||
break;
|
||||
LL_DELETE(session->lg_crcv, lg_crcv);
|
||||
coap_block_delete_lg_crcv(session, lg_crcv);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user