diff options
author | Oran Agra <oran@redislabs.com> | 2022-03-08 15:17:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-08 15:17:15 +0200 |
commit | b3fe4f31a2b705abef147edf4b625f53e2dc7c9f (patch) | |
tree | 2acf9d2033690ab76e500fdf3c00ddc1cc3bddb3 /src/server.c | |
parent | 4f19b4d0c1a40c7853557da31bc3c2c8dc101530 (diff) | |
download | redis-b3fe4f31a2b705abef147edf4b625f53e2dc7c9f.tar.gz |
dismiss COW of client output buffer now that it's dynamic (#10371)
since #9822, the static reply buffer is no longer part of the client structure, so we need to dismiss it.
Diffstat (limited to 'src/server.c')
-rw-r--r-- | src/server.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/server.c b/src/server.c index f170ea7a2..3674987a3 100644 --- a/src/server.c +++ b/src/server.c @@ -6417,7 +6417,8 @@ 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. */ + /* Dismiss client query buffer and static reply buffer. */ + dismissSds(c->buf); dismissSds(c->querybuf); dismissSds(c->pending_querybuf); /* Dismiss argv array only if we estimate it contains a big buffer. */ @@ -6443,9 +6444,6 @@ void dismissClientMemory(client *c) { if (bulk) dismissMemory(bulk, bulk->size); } } - - /* The client struct has a big static reply buffer in it. */ - dismissMemory(c, 0); } /* In the child process, we don't need some buffers anymore, and these are |