summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSalvatore Sanfilippo <antirez@gmail.com>2018-12-07 17:03:48 +0100
committerGitHub <noreply@github.com>2018-12-07 17:03:48 +0100
commitc6341ce3730cbe6c224c75311e79d5c50d238886 (patch)
treed4681c52baf7788959cbdeeb57cea038c7ebdb87
parent5a0b7212c9c3a672cb47fa2a773bc6cf1c2c4f17 (diff)
parent28c42814956a40f6c7b432a9692e1f1d7437925c (diff)
downloadredis-c6341ce3730cbe6c224c75311e79d5c50d238886.tar.gz
Merge pull request #5673 from soloestoy/check-current-client-after-freememory
networking: current_client should not be NULL when trim qb_pos
-rw-r--r--src/networking.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/networking.c b/src/networking.c
index 02d2a17ba..f19eb86bb 100644
--- a/src/networking.c
+++ b/src/networking.c
@@ -1470,7 +1470,7 @@ void processInputBuffer(client *c) {
}
/* Trim to pos */
- if (c->qb_pos) {
+ if (server.current_client != NULL && c->qb_pos) {
sdsrange(c->querybuf,c->qb_pos,-1);
c->qb_pos = 0;
}