summaryrefslogtreecommitdiff
path: root/src/hyperloglog.c
diff options
context:
space:
mode:
authorWuYunlong <xzsyeb@126.com>2020-01-07 11:17:52 +0800
committerWuYunlong <xzsyeb@126.com>2020-01-07 11:17:52 +0800
commitd6a13f444003e75e8ccbe97297bf32f0eb58cb23 (patch)
tree0786c60e1fb1e7bbad639efaf4e78bd2380e7672 /src/hyperloglog.c
parent9387f7333e0ccc200dda10032e517e2fb93cc368 (diff)
downloadredis-d6a13f444003e75e8ccbe97297bf32f0eb58cb23.tar.gz
Free allocated sds in pfdebugCommand() to avoid memory leak.
Diffstat (limited to 'src/hyperloglog.c')
-rw-r--r--src/hyperloglog.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/hyperloglog.c b/src/hyperloglog.c
index a44d15646..facd99743 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;
}