From adc5a3217c48dbe882b19d619eabd9b34f58496d Mon Sep 17 00:00:00 2001 From: sundb Date: Wed, 9 Mar 2022 19:32:03 +0800 Subject: [PATCH] Use dismissMemory to dismiss COW of client output buffer (#10403) c->buf is not sds, so we should use dismissMemory instead of dismissSds to dismiss it. This is a recent regression from #10371 --- src/server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server.c b/src/server.c index 3674987a3..49abf0748 100644 --- a/src/server.c +++ b/src/server.c @@ -6418,7 +6418,7 @@ void dismissMemory(void* ptr, size_t size_hint) { /* Dismiss big chunks of memory inside a client structure, see dismissMemory() */ void dismissClientMemory(client *c) { /* Dismiss client query buffer and static reply buffer. */ - dismissSds(c->buf); + dismissMemory(c->buf, c->buf_usable_size); dismissSds(c->querybuf); dismissSds(c->pending_querybuf); /* Dismiss argv array only if we estimate it contains a big buffer. */