From 6ca364b748b86fe5b16b8dcb673204baedc82456 Mon Sep 17 00:00:00 2001 From: Alexander Bushnev Date: Tue, 22 Oct 2024 19:03:40 +0200 Subject: [PATCH] Fix read/lease task cleanup (#760) --- src/transport/multicast/transport.c | 4 ++-- src/transport/unicast/transport.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/transport/multicast/transport.c b/src/transport/multicast/transport.c index d0f6abb3a..091539fbb 100644 --- a/src/transport/multicast/transport.c +++ b/src/transport/multicast/transport.c @@ -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); diff --git a/src/transport/unicast/transport.c b/src/transport/unicast/transport.c index c4433ac1a..01c19ce91 100644 --- a/src/transport/unicast/transport.c +++ b/src/transport/unicast/transport.c @@ -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