This is an automated email from the ASF dual-hosted git repository.
jiashunzhu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/brpc.git
The following commit(s) were added to refs/heads/master by this push:
new cb4ed160 fix-redis-response-mem-leak (#2340)
cb4ed160 is described below
commit cb4ed1601f1a46b4dcc73be10f8a9bd560610e2f
Author: Xiaowei Wang <[email protected]>
AuthorDate: Mon Aug 7 00:24:46 2023 +0800
fix-redis-response-mem-leak (#2340)
Co-authored-by: wangxiaowei <[email protected]>
---
src/brpc/redis_reply.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/brpc/redis_reply.h b/src/brpc/redis_reply.h
index d2515d85..34e64c00 100644
--- a/src/brpc/redis_reply.h
+++ b/src/brpc/redis_reply.h
@@ -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) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]