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
This commit is contained in:
sundb 2022-03-09 19:32:03 +08:00 committed by GitHub
parent b104f3cabc
commit adc5a3217c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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. */