Skip to content

Commit

Permalink
Fix read/lease task cleanup (#760)
Browse files Browse the repository at this point in the history
  • Loading branch information
sashacmc authored Oct 22, 2024
1 parent fe105a9 commit 6ca364b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
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

0 comments on commit 6ca364b

Please sign in to comment.