Coverity: Fix CID 1483550, 1670422-1670425

CID 1594475 is a false positive as multiple threads cannot execute in the same
code as global_lock is set.
This commit is contained in:
Jon Shallow authored and Jon Shallow committed 2026-03-26 09:24:44 +00:00
1 parent 0a48ceec41
commit 80c37b7bc6
4 files changed
+17 -14

No files matched your search

+8 -1
View File
@@ -19,6 +19,13 @@
CU_ASSERT_PTR_NOT_NULL(value); \
if ((void*)value == NULL) return;
#define ReturnIf_CU_ASSERT_PTR_NOT_NULL_Code(value,code) \
CU_ASSERT_PTR_NOT_NULL(value); \
if ((void*)value == NULL) { \
code; \
return; \
}
static coap_context_t *ctx; /* Holds the coap context for most tests */
static coap_session_t *session; /* Holds a reference-counted session object */
@@ -296,7 +303,7 @@ t_sendqueue11(void) {
COAP_REQUEST_CODE_GET,
0x1234,
64);
ReturnIf_CU_ASSERT_PTR_NOT_NULL(sent_pdu);
ReturnIf_CU_ASSERT_PTR_NOT_NULL_Code(sent_pdu, coap_delete_node(queued));
queued->next = NULL;
queued->session = coap_session_reference(session);