Skip to content

Commit

Permalink
fix-redis-response-mem-leak (apache#2340)
Browse files Browse the repository at this point in the history
Co-authored-by: wangxiaowei <wangxiaowei@bilibili.com>
  • Loading branch information
2 people authored and Yang Liming committed Oct 31, 2023
1 parent 6b66cbe commit 6452525
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/brpc/redis_reply.h
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,8 @@ inline void RedisReply::Swap(RedisReply& other) {
std::swap(_length, other._length);
std::swap(_data.padding[0], other._data.padding[0]);
std::swap(_data.padding[1], other._data.padding[1]);
std::swap(_arena, other._arena);
// reply _arena should not be swapped because _arena point to address in redisresponse.
// std::swap(_arena, other._arena);
}

inline void RedisReply::CopyFromSameArena(const RedisReply& other) {
Expand Down

0 comments on commit 6452525

Please sign in to comment.