From 558e0d40ad79f423c4784565648e6c83cf035777 Mon Sep 17 00:00:00 2001 From: deep Date: Wed, 3 Aug 2016 14:01:26 +0800 Subject: [PATCH] fix a memory leak bug for mset command --- src/proto/nc_redis.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/proto/nc_redis.c b/src/proto/nc_redis.c index b8ef86b3..2db88882 100644 --- a/src/proto/nc_redis.c +++ b/src/proto/nc_redis.c @@ -2333,6 +2333,8 @@ redis_copy_bulk(struct msg *dst, struct msg *src) mbuf_remove(&src->mhdr, mbuf); if (dst != NULL) { mbuf_insert(&dst->mhdr, mbuf); + } else { + mbuf_put(mbuf); } len -= mbuf_length(mbuf); mbuf = nbuf;