Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix read/lease task cleanup #760

Merged
merged 1 commit into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/transport/multicast/transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,11 @@ void _z_multicast_transport_clear(_z_transport_t *zt) {
// Clean up tasks
if (ztm->_read_task != NULL) {
_z_task_join(ztm->_read_task);
_z_task_free(&ztm->_read_task);
z_free(ztm->_read_task);
}
if (ztm->_lease_task != NULL) {
_z_task_join(ztm->_lease_task);
_z_task_free(&ztm->_lease_task);
z_free(ztm->_lease_task);
}
// Clean up the mutexes
_z_mutex_drop(&ztm->_mutex_tx);
Expand Down
4 changes: 2 additions & 2 deletions src/transport/unicast/transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -281,11 +281,11 @@ void _z_unicast_transport_clear(_z_transport_t *zt) {
// Clean up tasks
if (ztu->_read_task != NULL) {
_z_task_join(ztu->_read_task);
_z_task_free(&ztu->_read_task);
z_free(ztu->_read_task);
}
if (ztu->_lease_task != NULL) {
_z_task_join(ztu->_lease_task);
_z_task_free(&ztu->_lease_task);
z_free(ztu->_lease_task);
}

// Clean up the mutexes
Expand Down
Loading