From e67a3a377f7b6f1993fbb2bed6d4b2333212a9f2 Mon Sep 17 00:00:00 2001 From: WuYunlong Date: Tue, 7 Jan 2020 11:17:52 +0800 Subject: [PATCH] Free allocated sds in pfdebugCommand() to avoid memory leak. --- src/hyperloglog.c | 1 + 1 file changed, 1 insertion(+) 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; }