Commit 22d00d80 authored by Salvatore Sanfilippo's avatar Salvatore Sanfilippo
Browse files

Merge pull request #2542 from yossigo/lua_client_buffer_crash

Fix Redis server crash when Lua command exceeds client output buffer limit.
parents 827d07f0 49c1b60b
...@@ -805,7 +805,7 @@ void freeClient(redisClient *c) { ...@@ -805,7 +805,7 @@ void freeClient(redisClient *c) {
* a context where calling freeClient() is not possible, because the client * a context where calling freeClient() is not possible, because the client
* should be valid for the continuation of the flow of the program. */ * should be valid for the continuation of the flow of the program. */
void freeClientAsync(redisClient *c) { void freeClientAsync(redisClient *c) {
if (c->flags & REDIS_CLOSE_ASAP) return; if (c->flags & REDIS_CLOSE_ASAP || c->flags & REDIS_LUA_CLIENT) return;
c->flags |= REDIS_CLOSE_ASAP; c->flags |= REDIS_CLOSE_ASAP;
listAddNodeTail(server.clients_to_close,c); listAddNodeTail(server.clients_to_close,c);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment