Skip to content

Commit

Permalink
[ntcore] Fix memory leak in WebSocketConnection (#6439)
Browse files Browse the repository at this point in the history
  • Loading branch information
S1ink committed Mar 15, 2024
1 parent 3116f79 commit a1af235
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ntcore/src/main/native/cpp/net/WebSocketConnection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,8 @@ int WebSocketConnection::Flush() {
int count = 0;
for (auto&& frame :
wpi::take_back(std::span{m_frames}, unsentFrames.size())) {
ReleaseBufs(
std::span{m_bufs}.subspan(frame.start, frame.end - frame.start));
count += frame.count;
}
m_frames.clear();
Expand Down

0 comments on commit a1af235

Please sign in to comment.