summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWuYunlong <xzsyeb@126.com>2020-01-07 11:17:52 +0800
committerantirez <antirez@gmail.com>2020-03-05 16:28:30 +0100
commit80a49c37f9950503cee139d180d6250176bd60dd (patch)
tree8afdb805064963fa36a6bc50798fef4313ebd967
parent60870d3a10fd9496a3860ec77a953a51fa3410c6 (diff)
downloadredis-80a49c37f9950503cee139d180d6250176bd60dd.tar.gz
Free allocated sds in pfdebugCommand() to avoid memory leak.
-rw-r--r--src/hyperloglog.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/hyperloglog.c b/src/hyperloglog.c
index a2c789ddc..f9ae760e5 100644
--- a/src/hyperloglog.c
+++ b/src/hyperloglog.c
@@ -1535,6 +1535,7 @@ void pfdebugCommand(client *c) {
sds decoded = sdsempty();
if (hdr->encoding != HLL_SPARSE) {
+ sdsfree(decoded);
addReplyError(c,"HLL encoding is not sparse");
return;
}