diff --git a/include/zenoh-pico/net/session.h b/include/zenoh-pico/net/session.h index 20f309a38..4f899ccdc 100644 --- a/include/zenoh-pico/net/session.h +++ b/include/zenoh-pico/net/session.h @@ -95,7 +95,7 @@ typedef struct _z_session_t { #endif #if Z_FEATURE_INTEREST == 1 - _z_matching_listener_item_intmap_t *_matching_listeners; + _z_matching_listener_item_intmap_t _matching_listeners; #endif // Session interests diff --git a/src/session/utils.c b/src/session/utils.c index b11c5ab52..c40941973 100644 --- a/src/session/utils.c +++ b/src/session/utils.c @@ -97,7 +97,7 @@ z_result_t _z_session_init(_z_session_t *zn, const _z_id_t *zid) { #endif #if Z_FEATURE_MATCHING == 1 - zn->_matching_listeners = NULL; + zn->_matching_listeners = _z_matching_listener_item_intmap_make(); #endif _z_interest_init(zn); @@ -148,7 +148,7 @@ void _z_session_clear(_z_session_t *zn) { #endif #if Z_FEATURE_MATCHING == 1 - _z_matching_listener_item_intmap_clear(zn->_matching_listeners); + _z_matching_listener_item_intmap_clear(&zn->_matching_listeners); #endif _z_flush_interest(zn);