Skip to content

Commit

Permalink
Protect WriterHistory::remove_change_and_reuse (#5115) (#5120)
Browse files Browse the repository at this point in the history
Signed-off-by: Juan Lopez Fernandez <[email protected]>
(cherry picked from commit 0d996bc)

Co-authored-by: juanlofer-eprosima <[email protected]>
  • Loading branch information
mergify[bot] and juanlofer-eprosima authored Sep 6, 2024
1 parent c73df11 commit 68b7e03
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/cpp/rtps/history/WriterHistory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,8 @@ CacheChange_t* WriterHistory::remove_change_and_reuse(
return nullptr;
}

std::lock_guard<RecursiveTimedMutex> guard(*mp_mutex);

// Create a temporary reference change associated to the sequence number
CacheChange_t ch;
ch.sequenceNumber = sequence_number;
Expand Down

0 comments on commit 68b7e03

Please sign in to comment.