diff --git a/src/networking.c b/src/networking.c index 1478948e52..6226411a12 100644 --- a/src/networking.c +++ b/src/networking.c @@ -4440,6 +4440,7 @@ int checkClientOutputBufferLimits(client *c) { * Returns 1 if client was (flagged) closed. */ int closeClientOnOutputBufferLimitReached(client *c, int async) { if (c->flag.fake) return 0; /* It is unsafe to free fake clients. */ + serverAssert(c->conn); serverAssert(c->reply_bytes < SIZE_MAX - (1024 * 64)); /* Note that c->reply_bytes is irrelevant for replica clients * (they use the global repl buffers). */ diff --git a/src/server.c b/src/server.c index a024380bcf..42418ea657 100644 --- a/src/server.c +++ b/src/server.c @@ -897,6 +897,7 @@ int clientEvictionAllowed(client *c) { if (server.maxmemory_clients == 0 || c->flag.no_evict || c->flag.fake) { return 0; } + serverAssert(c->conn); int type = getClientType(c); return (type == CLIENT_TYPE_NORMAL || type == CLIENT_TYPE_PUBSUB); }