Skip to content

Commit

Permalink
capture message bytes by reference (#142)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexDayCRL authored Mar 27, 2024
1 parent 5e9a06c commit 290b37a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rmw_zenoh_cpp/src/rmw_zenoh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,7 @@ rmw_publish(
}
});
auto free_msg_bytes = rcpputils::make_scope_exit(
[msg_bytes, allocator, &shmbuf]() {
[&msg_bytes, allocator, &shmbuf]() {
if (msg_bytes && !shmbuf.has_value()) {
allocator->deallocate(msg_bytes, allocator->state);
}
Expand Down

0 comments on commit 290b37a

Please sign in to comment.