diff --git a/examples/z_liveliness.c b/examples/z_liveliness.c index 9b9a0965c..b21cc40bc 100644 --- a/examples/z_liveliness.c +++ b/examples/z_liveliness.c @@ -66,11 +66,11 @@ int main(int argc, char **argv) { sleep(1); } else if (c == 'd') { printf("Undeclaring liveliness token...\n"); - zc_liveliness_undeclare_token(&token); + z_drop(z_move(token)); } } - zc_liveliness_undeclare_token(z_move(token)); + z_drop(z_move(token)); z_close(z_move(s)); return 0; } diff --git a/include/zenoh_macros.h b/include/zenoh_macros.h index 4bb00e95e..2a2c23e51 100644 --- a/include/zenoh_macros.h +++ b/include/zenoh_macros.h @@ -37,7 +37,8 @@ z_owned_reply_channel_t * : z_reply_channel_drop, \ zc_owned_payload_t * : zc_payload_drop, \ zc_owned_shmbuf_t * : zc_shmbuf_drop, \ - zc_owned_shm_manager_t * : zc_shm_manager_drop \ + zc_owned_shm_manager_t * : zc_shm_manager_drop, \ + zc_owned_liveliness_token_t * : zc_liveliness_undeclare_token \ )(x) #define z_null(x) (*x = \