Skip to content

Commit

Permalink
fix(chunkserver): invalid memroy access
Browse files Browse the repository at this point in the history
Signed-off-by: Hanqing Wu <[email protected]>
  • Loading branch information
wu-hanqing committed Sep 25, 2023
1 parent e85455e commit 6704f16
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/chunkserver/raftlog/curve_segment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -439,8 +439,9 @@ int CurveSegment::append(const braft::LogEntry* entry) {
free(write_buf);
if (ret != static_cast<int>(to_write)) {
LOG(ERROR) << "Fail to write directly to fd=" << _direct_fd
<< ", buf=" << write_buf << ", size=" << to_write
<< ", offset=" << _meta.bytes << ", error=" << berror();
<< ", buf=" << static_cast<void*>(write_buf)
<< ", size=" << to_write << ", offset=" << _meta.bytes
<< ", error=" << berror();
return -1;
}
} else {
Expand Down

0 comments on commit 6704f16

Please sign in to comment.