Skip to content

Commit

Permalink
fix: liveliness double free
Browse files Browse the repository at this point in the history
  • Loading branch information
jean-roland committed Nov 16, 2024
1 parent 4a10390 commit e7bb6cf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/session/subscription.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,8 @@ z_result_t _z_trigger_liveliness_subscriptions_declare(_z_session_t *zn, _z_keye
_z_encoding_t encoding = _z_encoding_null();
_z_bytes_t payload = _z_bytes_null();
_z_bytes_t attachment = _z_bytes_null();
return _z_trigger_subscriptions_impl(zn, _Z_SUBSCRIBER_KIND_LIVELINESS_SUBSCRIBER, keyexpr, &payload, &encoding,
_z_keyexpr_t key = _z_keyexpr_alias(*keyexpr);
return _z_trigger_subscriptions_impl(zn, _Z_SUBSCRIBER_KIND_LIVELINESS_SUBSCRIBER, &key, &payload, &encoding,
Z_SAMPLE_KIND_PUT, timestamp, _Z_N_QOS_DEFAULT, &attachment,
Z_RELIABILITY_RELIABLE);
}
Expand All @@ -212,7 +213,8 @@ z_result_t _z_trigger_liveliness_subscriptions_undeclare(_z_session_t *zn, _z_ke
_z_encoding_t encoding = _z_encoding_null();
_z_bytes_t payload = _z_bytes_null();
_z_bytes_t attachment = _z_bytes_null();
return _z_trigger_subscriptions_impl(zn, _Z_SUBSCRIBER_KIND_LIVELINESS_SUBSCRIBER, keyexpr, &payload, &encoding,
_z_keyexpr_t key = _z_keyexpr_alias(*keyexpr);
return _z_trigger_subscriptions_impl(zn, _Z_SUBSCRIBER_KIND_LIVELINESS_SUBSCRIBER, &key, &payload, &encoding,
Z_SAMPLE_KIND_DELETE, timestamp, _Z_N_QOS_DEFAULT, &attachment,
Z_RELIABILITY_RELIABLE);
}
Expand Down

0 comments on commit e7bb6cf

Please sign in to comment.