From 28c42814956a40f6c7b432a9692e1f1d7437925c Mon Sep 17 00:00:00 2001 From: "zhaozhao.zz" Date: Fri, 7 Dec 2018 19:14:33 +0800 Subject: [PATCH] networking: current_client should not be NULL when trim qb_pos --- src/networking.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/networking.c b/src/networking.c index 02d2a17b..f19eb86b 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; }