Merge pull request #5673 from soloestoy/check-current-client-after-freememory

networking: current_client should not be NULL when trim qb_pos
This commit is contained in:
Salvatore Sanfilippo 2018-12-07 17:03:48 +01:00 committed by GitHub
commit c6341ce373
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
}