summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOran Agra <oran@monfort.co.il>2016-04-25 14:18:40 +0300
committerantirez <antirez@gmail.com>2016-05-05 14:01:08 +0200
commitd6864d299904fe0e53797e4c8bd3b29a32869fd0 (patch)
tree0eff6bbec21b68cda36ef31056a703e43a642eef
parentd8679070b8d41df8cfa88584086b3b0910ecf10b (diff)
downloadredis-d6864d299904fe0e53797e4c8bd3b29a32869fd0.tar.gz
additional fix to issue #2948
-rw-r--r--src/networking.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/networking.c b/src/networking.c
index 6d9cb936d..11ed9390a 100644
--- a/src/networking.c
+++ b/src/networking.c
@@ -1147,6 +1147,9 @@ void processInputBuffer(redisClient *c) {
/* Only reset the client when the command was executed. */
if (processCommand(c) == REDIS_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;
}
}
}