From b5548957156207f066b536f2a1bdd5193760199b Mon Sep 17 00:00:00 2001 From: Oran Agra Date: Mon, 25 Apr 2016 14:18:40 +0300 Subject: [PATCH] additional fix to issue #2948 --- src/networking.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/networking.c b/src/networking.c index 8f165be79..e4f5d709d 100644 --- a/src/networking.c +++ b/src/networking.c @@ -1268,6 +1268,9 @@ void processInputBuffer(client *c) { /* Only reset the client when the command was executed. */ if (processCommand(c) == C_OK) resetClient(c); + /* freeMemoryIfNeeded may flush slave output buffers. This may result + * into a slave, that may be the active client, to be freed. */ + if (server.current_client == NULL) break; } } server.current_client = NULL;