Skip to content

Commit

Permalink
Fix kernel panic on request free
Browse files Browse the repository at this point in the history
when freeing request objects, the pointer to the kernel objects was
given to free instead of the kernel object, resulting in a value, that
is out of bounds, which results in a kernel panic.
  • Loading branch information
gumulka committed Sep 4, 2024
1 parent d5ac8a7 commit a985098
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/coap_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ static void coap_client_request_free(struct coap_client_request *req) {
if (sys_dnode_is_linked(&req->node)) {
sys_dlist_remove(&req->node);
}
k_mem_slab_free(&coap_msg_slab, &block);
k_mem_slab_free(&coap_msg_slab, block);
}

struct coap_client_request *coap_client_request_alloc(uint8_t type, uint8_t code) {
Expand Down

0 comments on commit a985098

Please sign in to comment.